Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main ()
- {
- int x, p, c;
- printf("Unesite redom x, p i c: ");
- scanf("%d %d %d", &x, &p, &c);
- int r;
- printf("%d\n", x/(int)pow(10,p));
- printf("%d\n", (int)pow(10, p+1));
- printf("%d\n", c * (int)pow(10, p));
- r = (x / pow(10, p)) * pow(10, p+1) + c * pow(10, p);
- printf("Rezultat je: %d\n", r);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement