Kagalive icon

conditions-v1

Kagalive | PRO | 10/02/20 12:28:06 AM UTC | 0 ⭐ | 1880 👁️ | Never ⏰ | []
C++ |

280 B

|

None

|

0 👍

/

0 👎

#include <iostream>
using std::cin;
using std::cout;
 
int main() 
{
 int a{2};
 int b{3};
 
 cout << a << " * " << b << " = ? ";
 
 int userAnswer{};
 cin >> userAnswer;
 
 if (userAnswer == (a*b) )
 { 
   cout << "Correct!\n";
 }
 else 
 {
  cout << "Wrong!\n";
 }
 
 
}

Comments