/* password program in c++
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
char pss=' ';
string pass="";
cout<<"enter your password :"<<endl;
while(pss!=13)
{
pss=getch();
if(pss!=13)
{
pass+=pss;
cout<<"*";
}
}
if(pass=="1234")
{
cout<<" passowrd is ok ";
}
else
{
cout<<"not accepted ";
}
}
click to watch video
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
char pss=' ';
string pass="";
cout<<"enter your password :"<<endl;
while(pss!=13)
{
pss=getch();
if(pss!=13)
{
pass+=pss;
cout<<"*";
}
}
if(pass=="1234")
{
cout<<" passowrd is ok ";
}
else
{
cout<<"not accepted ";
}
}
click to watch video
Comments
Post a Comment