passwords

closed account (SEbXoG1T)
i password protected my calc (i'm paranoid) but i want to change the password so it looks like ******* ****** when i log on.

/* not copyrighted in any way shape or form.
made purely for the joy of calculating.

-jg16477 */



#include <iostream>
#include <string>
using namespace std;
int main() {
double a,b;
char answer;
std::string input, input2, input3, input4;
do {
cout<<"login: ";
cin>>input3;
} while (input3 != "jg16477") ;
do {
cout<<"password: ";
cin>>input4;
} while (input4 != "dragon2") ;
cout<<"hello mr. grass!! ";
cin.get();

do
{
cout<<"what operation do you wish to do? [+-*/] ";
cin>>answer;
switch (answer) {
case '*':
cout<<"multiplication";
cin>>a;
cout<<"* ";
cin>>b;
cout<<a*b;
cin.get();
cin.get();
break;
case '/':
cout<<"division";
cin>>a;
cout<<"/ ";
cin>>b;
cout<<a/b;
cin.get();
cin.get();
break;
case '+':
cout<<"addition";
cin>>a;
cout<<"+ ";
cin>>b;
cout<<a+b;
cin.get();
cin.get();
break;
case '-':
cout<<"subtraction";
cin>>a;
cout<<"- ";
cin>>b;
cout<<a-b;
cin.get();
cin.get();
break;
default:
do {
cout<<"please input an answer\n";
cout<<"what operation do you wish to do? [+-*/] ";
cin>>answer;
switch (answer) {
case '*':
cout<<"multiplication ";
cin>>a;
cout<<"* ";
cin>>b;
cout<<a*b;
cin.get();
cin.get();
break;
case '/':
cout<<"division ";
cin>>a;
cout<<"/ ";
cin>>b;
cout<<a/b;
cin.get();
cin.get();
break;
case '+':
cout<<"addition ";
cin>>a;
cout<<"+ ";
cin>>b;
cout<<a+b;
cin.get();
cin.get();
break;
case '-':
cout<<"subtraction ";
cin>>a;
cout<<"- ";
cin>>b;
cout<<a-b;
cin.get();
cin.get();
break;
}} while (((input2 != "*") || (input2 != "-") || (input2 != "+") || (input2 != "/") ));


}
cout<<"do you wish to go again? [Y/N] ";
cin >> input;
} while ((input == "Y") || (input == "y"));
return 0;

}
Topic archived. No new replies allowed.