fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int n;
  5. scanf ("%d",&n);
  6. printf ("%d\n",(n/100));
  7. printf ("%d\n",((n/10)%10));
  8. printf ("%d\n",(n%10));
  9. return 0;
  10. }
  11.  
  12. // 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.
Success #stdin #stdout 0s 5320KB
stdin
123
stdout
1
2
3