Advertisement
Guest User

invertor de cu

a guest
Apr 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main () {
  5.  
  6. int A;
  7. printf("Digite o numero a ser invertido\n");
  8. scanf("%i", &A);
  9. int B= 10;
  10. int sobra= A %10;
  11.  
  12. while (A>0){
  13. printf("%i\n", sobra);
  14. A/=10;
  15. sobra= A%10;
  16. }
  17.  
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement