write a program to input a number and print its digit in different line
Answers
Answered by
0
Answer:
please tell specifically of which program,is it c or Java or python
Answered by
1
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int n, a, b, c;
cout<<"Enter a 3-digit number : ";
cin>>n;
a = n % 10;
n = n / 10;
b = n % 10;
n = n / 10;
c = n % 10;
cout<<c<<endl<<b<<endl<<a<<endl;
return 0;
}
Similar questions