Ad Home

Theme images by kelvinjay. Powered by Blogger.

Travel

Header Ads

Java

Selenium

UFT

Framework

General QA Concept

BDD

» » Read any Four-digit number and display the number in reverse order

Dim num,rev
num= inputbox("Enter a number")
If len(num)=4 Then

rev=rev*10 + num mod 10
num=num/10
num= left(num,3)

rev=rev*10 + num mod 10
num=num/10
num= left(num,2)

rev=rev*10 + num mod 10
num=num/10
num= left(num,1)

rev=rev*10 + num mod 10

msgbox "Reverse Order of the number is "&rev
Else
msgbox "Number, you entered is not a 4 digit number"
End If

«
Next
Newer Post
»
Previous
Older Post

No comments:

Leave a Reply