Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- void main(void)
- {
- char str[6] = "12345";
- unsigned int i = 0, a = 0;
- while (str[i] != NULL && (a+=(str[i] - 48) * pow(10, strlen(str) - i - 1))) i++;
- printf("\n %d \n", a);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement