fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main()
  6. {
  7. int n= 1234;
  8. int anzahl=4;
  9. int ergebnis;
  10.  
  11. for (int i=0 ; i<anzahl; i++){
  12.  
  13. int a= pow(10.0 , 1+i);
  14.  
  15. ergebnis= n % a;
  16.  
  17. printf("%d\n\n",ergebnis);
  18. }
  19.  
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 4540KB
stdin
Standard input is empty
stdout
4

34

234

1234