Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(int argc, char** argv) {
  5. bool repetir=true;
  6. char opcion;
  7. int resul=0,error=0;
  8.  
  9. cout<<"t MENU"<<endl;
  10. cout<<"+: SUMA"<<endl;
  11. cout<<"-: Resta"<<endl;
  12. cout<<"*: Multiplicacion"<<endl;
  13. cout<<"/: Dividir "<<endl;
  14. cout<<"%: Potencia"<<endl;
  15. cout<<"!: Factorial"<<endl;
  16. cout<<"S: salir"<<endl;
  17.  
  18.  
  19. while(repetir==true){
  20.  
  21. cout<<"Eliga una opcion:";
  22. cin>>opcion;
  23. if(opcion!='S'||opcion!='s' ){
  24. cout<<"el resultado de la operacion ("<<opcion<<") es: "<<resul<<endl;
  25. cout<<"error: "<<error<<endl;
  26. repetir=true;
  27. }
  28.  
  29.  
  30. if(opcion=='s'|| opcion=='S'){
  31. cout<<"hasta pronto"<<endl;
  32. repetir=false;
  33. }
  34.  
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement