Write a Java program to input three digit numbers and print all the digits on the new line.
Input: 354
Output: 3
5
4
Answers
Answered by
5
Answer:
SEE MY POST BELOW AND PLS MARK ME AS BRAINLIST
Attachments:
Answered by
34
Here is your answer.
It works for any digit number.
class x
{
static void main(int n)
{
while(n! =0)
{
int d=n%10;
System.out.print(d);
n/=10;
}
}
}
Similar questions
Math,
4 months ago
Social Sciences,
4 months ago
Biology,
4 months ago
Social Sciences,
8 months ago
English,
11 months ago
Social Sciences,
11 months ago