Try this

X = 5

Y = x/2
Case 1
If instr(1,y,".") > 0 then
Odd
End if
Case 2
If isdecimal(y) then
Odd
End if 

Sent from my iPhone

On 05/02/2013, at 4:50 PM, RAJ KAMAL <[email protected]> wrote:

> You cannot use above code It will give wrong answer... 4/2 = 2 not equal to 
> 0... So it wil give odd..  = Wrong approach,
> 
> 
> 
> Use this
> 
> a= 1st number
> b= 2nd number
> 
> If a mod b = 0, then even... Else odd
> 
> 
> 
> -Thanks & Regards,
> 
> RAJ KAMAL
> 
> 
> 
> -- 
> -- 
> 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.


Reply via email to