Basic input

Hey

I am really just practising my C++ and i have found that i have forgotten most of the basics, can you please help me with this.

I cant seem to figure out how to get the user to input 2 numbers into the program in order to be calculated

#include <iostream>
using namespace std;
int main ()
{
int a, b;
int result;

cout << "input interger A";
cin >> " ";
cout << "input interger B";
cin << " ";


a = a + 3;
result = a * b;

cout << result;
system ("pause");
return 0;
}



Thanks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
using namespace std;
int main ()
{
int a, b;
int result;

cout << "input interger A";
cin >> a;
cout << "input interger B";
cin >> b;


a = a + 3;
result = a * b;

cout << result;
system ("pause");
return 0;
}
Topic archived. No new replies allowed.