Hi, Anybody could tell me What is the script for Reverse of
Given number. Ex:236--632. Thanks in Advance..
Answer Posted / bragaadeesh
public class RevNum {
public static void main(String args[]){
int sampleNum = 12345678;
System.out.println("Input Num : "+sampleNum);
int reversedNum = 0;
while(sampleNum!=0){
reversedNum = reversedNum*10 + sampleNum%10;
sampleNum = sampleNum/10;
}
System.out.println("Reversed Num : "+reversedNum);
}
}
//SAMPLE OUTPUT
//Input Num : 12345678
//Reversed Num : 87654321
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Mention what is the technology used by vb script?
how to check whether link is disabled in QTP??
How will you get the octal value of the given number in vbscript?
How will you check that a variable is an array in vbscript?
Difference between dim,public and private variables in vb script?
Mention what is the difference between vbscript and vba?
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
Which loop is used in case of arrays in the vbscript language?
how to operate webobjects in a webpage using getobject function and then using generic methods?
Which operator can be used to do an xor operation in vbscript?
I need to get some data from data base and store this
(retrieved) data in a excel sheet using VB script in QTP9.0
I have created connection for data base
I have created as excels sheet by using
Set XL=CreateObject("Excel.Application")
XLworksheet.cells(1,1).value= rs.fields.item("<
Mention what is byref and byval parameters in vbscript?
how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me
Write a code to print numbers from 5 to 0?
PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com