35657

Untitled

Oct 19th, 2023
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1.  
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     setlocale(LC_ALL, "ru");
  8.  
  9.     double diag;
  10.  
  11.     cout << "Введите диагональ в дюймах: " ;
  12.  
  13.     cin >> diag;
  14.  
  15.     int result = diag * 2.54 + 0.5;
  16.  
  17.     cout << "Диагональ в сантиметрах: " << result << endl;
  18. }
Add Comment
Please, Sign In to add comment