C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Calculate reverse the give number using Java
WhatsApp
Senthilvelan Sambamoorthy
Aug 13
2016
591
0
1
ssvrev.rar
// reverse the number
import
java.io.*;
class
ssvrev
{
public
static
void
main(String args[])
throws
IOException
{
int
num;
BufferedReader ip =
new
BufferedReader(
new
InputStreamReader(System.in));
System.out.println(
"\n\t\t\tREVERSING THE GIVEN DIGIT"
);
System.out.print(
"\n\n\tNumber: "
);
num = Integer.parseInt(ip.readLine());
System.out.print(
"\n\n\n\t\tReversed Didits: "
);
do
{
int
t = num %
10
;
System.out.print(t);
num = num /
10
;
}
while
(num>
0
);
System.out.println();
}
// end of main function
}
// end of class
Java
Up Next
Calculate reverse the give number using Java