DevelopersSociety

Tuesday, December 9, 2014

C++ Tutorial- Program- 5- if within if statement


Code:

#include<iostream>
using namespace std;
main()
{
string username,password; 

cout<<"Enter Username:";
cin>>username;
cout<<"Enter Password:";
cin>>password;

if(username ==password)
if(password==username)
cout<<"Successfully Login"<<endl;
else
cout<<"Login Failed"<<endl;
return 0;
}

Output:


No comments:

Post a Comment