_strangeman

2-nd task (hometask)

Oct 24th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5.     double x, y;
  6.     std::cout << "Enter the value: ";
  7.     std::cin >> x;
  8.     std::cin.ignore(2,'\n'); \\Хак: Удаляю симовл перевода строки из буфера ввода
  9.     if (x <= 4096)
  10.     {
  11.         y = 32;
  12.     }
  13.     else {
  14.         y = 64;
  15.     }
  16.     std::cout << "You need a system with the bit " << y << std::endl;
  17.     std::cout << "Press [Enter] to continue...";
  18.     std::cin.ignore();
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment