num=4 If i/2 = 0 then msgbox "Even Number" Else msgbox "Odd Number" End If On Mon, Feb 4, 2013 at 8:25 AM, gaurav sharma <[email protected]> wrote:
> Hi [email protected], > > Try to run this code on:- > > inum=82. > > The result is "ODD" which is wrong! > > Pls chk it.. > > Regards, > Gaurav > Accenture > > On Thu, Dec 20, 2012 at 8:16 AM, QTP <[email protected]> wrote: > >> Hi Try out this simple logic >> >> >> inum=33 >> rnum=(inum/2) >> >> snum =mid(rnum,len(rnum),1) >> >> num=cint(snum) >> msgbox num >> >> >> If num = 2 or num = 4 or num=6 or num = 8 or num = 0 Then >> msgbox "x is even" >> >> else >> msgbox "x is odd " >> End If >> >> >> >> let me know if u need some-other logic >> >> Regards >> Arun >> >> On Saturday, December 15, 2012 10:33:09 AM UTC+5:30, vijay kanaparthi >> wrote: >>> >>> Hi all, >>> >>> how can u find the number even or odd without using mod function in qtp >>> >>> -- >>> Thanks & Regards, >>> Vijay >>> 9916686756 >>> >>> -- >> You received this message because you are subscribed to the Google >> "QTP - HP Quick Test Professional - Automated Software Testing" >> group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/MercuryQTP?hl=en >> > > > > -- > GAURAV SHARMA > S/W ENGG. > ACCENTURE > > -- > -- > You received this message because you are subscribed to the Google > "QTP - HP Quick Test Professional - Automated Software Testing" > group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "QTP - HP Quick Test Professional - Automated Software Testing" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
