Hello, im trying to learn how to programm and im trying to make a little test now as my first project. I want to make it so if you get the answer wrong it throws you back and makes you try again until you get it right, what is the proper comand for it?
#include <iostream>
using namespace std;
int main()
{
int number;
cout << "solve 2+2= ";
cin >> number;
{
cout << "your answer was " << number << endl;
}
if (number == 4)
{
cout << "the answer " << number << " is right" << endl;
}
else
{
cout << "the answer " << number << " is wrong" << endl;
}