Advertisement
evage

№2 целой k присвоить...

Sep 19th, 2021
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int k;
  6.     int x;
  7.     cout << "Enter a number\n";
  8.     cin >> x;
  9.  
  10.     k = (x / 100) % 10;
  11.     cout << k;
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement