Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(int argc, char** argv) {
- bool repetir=true;
- char opcion;
- int resul=0,error=0;
- cout<<"t MENU"<<endl;
- cout<<"+: SUMA"<<endl;
- cout<<"-: Resta"<<endl;
- cout<<"*: Multiplicacion"<<endl;
- cout<<"/: Dividir "<<endl;
- cout<<"%: Potencia"<<endl;
- cout<<"!: Factorial"<<endl;
- cout<<"S: salir"<<endl;
- while(repetir==true){
- cout<<"Eliga una opcion:";
- cin>>opcion;
- if(opcion!='S'||opcion!='s' ){
- cout<<"el resultado de la operacion ("<<opcion<<") es: "<<resul<<endl;
- cout<<"error: "<<error<<endl;
- repetir=true;
- }
- if(opcion=='s'|| opcion=='S'){
- cout<<"hasta pronto"<<endl;
- repetir=false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement