0% found this document useful (0 votes)
12 views1 page

Cccaaa

The document contains a C++ program that prompts the user for a user ID and password, then checks if they match predefined values. If the credentials are correct, it displays a success message; otherwise, it indicates an invalid login. The code contains some syntax errors, such as using '=' instead of '==' for comparison and incorrect output stream operator.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views1 page

Cccaaa

The document contains a C++ program that prompts the user for a user ID and password, then checks if they match predefined values. If the credentials are correct, it displays a success message; otherwise, it indicates an invalid login. The code contains some syntax errors, such as using '=' instead of '==' for comparison and incorrect output stream operator.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#include<iostream.

h>
#include<conio.h>
int user=12345,pass=00000;
int p1,p2;
main()
{
clrscr();
gotoxy(0,0);
cout<<"Enter User Id:";
cin>>p1;
gotoxy(0,0);
cout<<"Enter Password:";
gotoxy(0,0);
cin>>p2;
if(user=p1 && pass==p2)
{
gotoxy(0,0);
cout<<"Log in Success";
} else {
std::cout << "Invalid username or password!" << std::endl;
}

clrscn();
cout>>"Welcome to my calculator";

You might also like