-
Notifications
You must be signed in to change notification settings - Fork 0
/
QuesNo16.cpp
44 lines (34 loc) · 824 Bytes
/
QuesNo16.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <iostream>
#include <string>
using namespace std;
int main()
{
string password,newname;
string lastpassword[1];
string name[1];
cout << "Enter your last password: ";
cin >> lastpassword[0];
cout << "Enter new password: ";
cin >> password;
if (lastpassword[0] != password)
{
cout << "This is your new password " << password <<"." <<endl;
}
else
{
cout << "Type a new password first then login in to your pc."<<endl;
}
cout << "Enter your old pc name: "<<endl;
cin >> name[0];
cout << "Enter new pc name: "<<endl;
cin >> newname;
if (name[0] != newname)
{
cout << "Welcome to your new pc " << newname <<"." <<endl;
}
else
{
cout << "Sorry this is not your pc. ";
}
return 0;
}