0
Code not working!
So i made this code #include <iostream> 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?
5 Answers
+ 1
as far as i can see, there is no error in your Code. the Program only does what you told it to do.
After your cin >> b; call there is no Code left to get rid of. So your Program calls return 0 what means "i'm done. no Errors. I close this.
+ 1
#include<iostream.h>
0
please input additional code like Cout the user input in a and b. let's see. it will execute well
0
ok thanks Steven and thanks Issah! I'll try that out soon ;)
0
Did you enter the password in the form of numbers?? Also provide input for both the statements in the same input area if you are using the compiler of this app. And while entering the input make sure to separate them with a space. Hope it works. Try adding a cout statement to see if it works.