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

Explain about vb script?

1275


How to create a cookie using vbscript?

1273


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

1983


What are the naming conventions while declaring a variable in the vbscript language?

1090


We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

2247


Explain different types of segment?

1089


how to write validation function for date in vb script

2683


Write a Script for ATM in QTP

3948


What is loose binding? Why is it not a good practice to use it?

1157


hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?

2405


How can you destroy an object in vbscript?

1169


What is the purpose of regexp object in vbscript?

1080


Compare java script and vb script?

1142


What are the data types supported by vbscript?

1176


Mention what if you do not specify anything when you call a procedure?

1030