Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- char c[30], i;
- scanf("%s", c);
- int result = 0;
- for(i = 0; c[i]; ++i){
- result *= 10;
- result += c[i] - '0';
- }
- printf("%d\n", result);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement