Write a program in java to input a number and display every digit of the number
Answers
Answered by
2
Answer:
The program output is also shown below.
public class Increment_Digits.
int n, m = 0, a;
Scanner s = new Scanner(System.
System. out. print("Enter any number:");
n = s. nextInt();
while(n > 0)
a = n % 10;
a++;
Similar questions