Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- int num;
- int numinfor;
- int stepen;
- cout << "Vvedite 5-znachnoje chislo: ";
- cin >> num;
- for (int i = 4; i >= 0; i--) {
- stepen = pow(10, i);
- numinfor = ( num - num % stepen ) / stepen;
- cout << 5-i << " cifra ravna " << numinfor << endl;
- num %= stepen;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement