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

Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?

2433


Explain about tristate constants?

950


Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.

2144


Mention what is the main difference between function and sub-procedure?

972


What are the different types of operators and their order of precedence?

984


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

3025


what is the object hyrarchy in QTP for a web based application

2315


How to get the length of the string by making use of the string function?

1008


how does vb script help in web page designing? explain with example.

1934


How do i automate a website www.flyashx.com without having any test cases witin a week time.

1846


Explain the tristate constants in vbscript?

974


A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.

1888


Explain the adodb.stream class?

930


Which operator is used to concatenate the 2 values in the vbscript language?

961


write a function to read the items from combobox of Flight reservation & save in excel (QTP)??

2783