Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main()
- {
- int x, y, z, f;
- cout << "Enter x=";
- cin >> x;
- y = 100;
- if ((x / 100) == 0)
- {
- cout << "число менее трех разрядов \n";
- }
- else
- {
- z = x / y;
- f = z % 10;
- cout << "Третий разряд справа = " << f << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement