#include <stdio.h> int main() { int n; scanf ("%d",&n); printf ("%d\n",(n/100)); printf ("%d\n",((n/10)%10)); printf ("%d\n",(n%10)); return 0;} // Write a program to read a number x between 100 and 999, then print the first digit of x, then the second, then the third digit. Every digit is in its own line.
123
1 2 3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!