Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     char c[30], i;
  5.     scanf("%s", c);
  6.     int result = 0;
  7.     for(i = 0; c[i]; ++i){
  8.         result *= 10;
  9.         result += c[i] - '0';
  10.     }
  11.     printf("%d\n", result);
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement