Please could someone let me know what i'm missing here...?
#include <iostream>
#include <string>
#include <sstream> //#include = what types of coding to be included throughout the coding
using namespace std; //uses the standard library to recognise and process commands
{ int main ()
int answer, a, b, c;
a=5, b=3;
c=a+b;
do {
cout << "\nWhat is 5 + 3?";
cin >> answer;
if (answer != c ) cout << "\nWRONG! Try again."; }
while (answer != c);
cout << "CORRECT!! :)";
cout << " \n"; //the 'press any key to continue...' at the end of programme is shifted down to the next line
return 0;
}
#include <iostream>
#include <string>
#include <sstream> //#include = what types of coding to be included throughout the coding
usingnamespace std; //uses the standard library to recognise and process commands
{ int main ()
int answer, a, b, c;
a=5, b=3;
c=a+b;
do {
cout << "\nWhat is 5 + 3?";
cin >> answer;
if (answer != c ) cout << "\nWRONG! Try again.";
}while (answer != c);
cout << "CORRECT!! :)";
cout << " \n"; //the 'press any key to continue...' at the end of programme is shifted down to the next line
return 0;
}