Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
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
556
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