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
Java - Do While Statement
WhatsApp
Senthilvelan Sambamoorthy
Aug 20
2016
569
0
0
ssvdowhile.rar
import
java.io.*;
class
ssvdowhile
{
public
static
void
main(String arg[])
throws
IOException
{
String t;
int
c,n;
c=
0
;
DataInputStream dr =
new
DataInputStream(System.in);
System.out.print(
"Enter a whole Number : "
);
t = dr.readLine();
n = Integer.parseInt(t);
do
{
n = n/
10
;
c = c+
1
;
}
while
(n !=
0
);
System.out.println(
"\nThe given Number is a "
+ c +
" Digit Number"
);
}
}
Java
Do While Statement
Up Next
Java - Do While Statement