Not working how it should!!

So i made this code

include

using namespace std;

int main()
{
int a;
int b;

cout << "please give login: ";
cin >> a;

cout << "\n\nplease give password: ";
cin >> b;

return 0;

}

And what i get is

please give login: (something)

please give password:
Process returned 0 (0x0) execution time : 8.771 s
Press any key to continue.

Well i said to ask the user to input the seccond variable yet it doesn't work. Anybody know what's wrong?

Comments

  • Your a and b are integers.

  • a and b should be strings not integers if you declare them as int the user can give just numbers

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion