Advertisement
Guest User

Untitled

a guest
May 25th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. // romashka.cpp: определяет точку входа для консольного приложения.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <conio.h>
  7. using namespace std;
  8.  
  9.  
  10. int main()
  11. {
  12.     int x;
  13.  
  14.     cout << "enter x: " << endl;
  15.     cin >> x;
  16.  
  17.     if (x == 5)
  18.     {
  19.         cout << "x equals to 5" << endl;
  20.     }
  21.     else {
  22.         if (x > 5)
  23.         {
  24.             cout << "x more than 5" << endl;
  25.         }
  26.         else {
  27.             cout << "x less than 5" << endl;
  28.         }
  29.     }
  30.     _getch();
  31.         return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement