Its a bug ??
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#include<iostream>
using namespace std;
int main()
{
int a;
cin>>a;
cin.ignore();
int b = 2;
cout<<b;
return 1;
}
| |
When I run the program and I put a data in the variabe a(ex: a = 3). Show me 3 and 2. Why??
Last edited on
So you type in the number 3, and the screen looks like this:
3
Then the program outputs the number 2, so the screen looks like this:
The 3 is there because you typed it. The two is there because the program output it.
Topic archived. No new replies allowed.