Vou postar minha nova calculadora em c++ com usuário e senha. pf postem oque acharam.Código:#include <iostream> #include <string> #include <cmath> #include <windows.h> #include <conio.h> using namespace std; int main() { int b,c,d,e,f,g; cout << "Calculadora Em C++ Com Senha By Diego" << endl; Sleep(2000); new_number: system("cls"); cout << "Usuario:"; cin >> b; cout << endl; cout << "Senha:"; Sleep(5000); cin >> f; if(b != 45715 && f !=1997 ){ system("cls"); cout << "Usuario Ou Senha Incorretos"; Sleep(1300); goto new_number; } menu: system("cls"); cout << "Oque Deseja Fazer?" << endl; cout << endl; cout << "(1)...Elevar Um Numero" << endl; cout << "(2)...Saber A Raiz Quadrada" << endl; cout << "(3)...Somar" << endl; cout << "(4)...Subtrair" << endl; cout << "(5)...Dividir" << endl; cout << "(6)...Mutiplicar" << endl; cout << "(7)...Sair" << endl; long h = 0; cin >> h; system("cls"); if(h == 1){ cout << "Deseja Elevar Qual Numero?"; Sleep(1000); system("cls"); double i,j; cin >> i; cout << "Elevado a" << endl; cin >> j; cout << "=" << endl; cout << pow(i,j) << endl; Sleep(3000); goto menu; } if(h == 2){ cout << "Deseja Saber A Raiz Quadrada De Qual Numero?"; Sleep(1000); system("cls"); double i = 0; cin >> i; cout << "=" << endl; cout << sqrt(i); Sleep(3000); goto menu; } if(h == 3){ cout << "Deseja Somar Quais Numeros?"; Sleep(1000); system("cls"); double i,j; cin >> i; cout << "+" << endl; cin >> j; cout << "=" << endl; cout << i + j << endl; Sleep(3000); goto menu; } if(h == 4){ cout << "Deseja Subitrair Quais Numeros?"; Sleep(1000); system("cls"); double i,j; cin >> i; cout << "-" << endl; cin >> j; cout << "=" << endl; cout << i - j << endl; Sleep(3000); goto menu; } if(h == 5){ cout << "Deseja Dividir Quais Numeros?"; Sleep(1000); system("cls"); double i,j; cin >> i; cout << "/" << endl; cin >> j; cout << "=" << endl; cout << i / j << endl; Sleep(3000); goto menu; } if(h == 6){ cout << "Deseja Mutiplicar Quais Numeros?"; Sleep(1000); system("cls"); double i,j; cin >> i; cout << "*" << endl; cin >> j; cout << "=" << endl; cout << i * j << endl; Sleep(3000); goto menu; } if(h == 7){ return 0; } }


Responder com Citação


