Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <math.h>
- void main()
- {
- int n, k,BC = 0;
- n = 12345;
- k = 2;
- int pom = n;
- while (pom > 0)
- {
- BC++;
- pom /= 10;
- }
- for (int i = 1; i <= k; i++)
- {
- pom = n % 10;
- n /= 10;
- n += pom*pow(10.0, BC-1);
- }
- printf("12345 za 2 mesta u desno je %d", n);
- }
Advertisement
Add Comment
Please, Sign In to add comment