Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Mention what is the technology used by vb script?

980


how to check whether link is disabled in QTP??

6113


How will you get the octal value of the given number in vbscript?

961


How will you check that a variable is an array in vbscript?

1008


Difference between dim,public and private variables in vb script?

952


Mention what is the difference between vbscript and vba?

1054


create a form to accept username and password validate the username and password with using message box, display the corresponding user message

2629


Which loop is used in case of arrays in the vbscript language?

966


how to operate webobjects in a webpage using getobject function and then using generic methods?

3111


Which operator can be used to do an xor operation in vbscript?

1255


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("<>") I have taken a for loop and changed the cells values (1 as i and another 1 as j) But still I am not able to get Plz kindly tell me know this . It is very urgent

2245


Mention what is byref and byval parameters in vbscript?

1014


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

14208


Write a code to print numbers from 5 to 0?

1131


PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com

2131