Posted by : Unknown jueves, 21 de mayo de 2015

#include<stdio.h>
#include<iostream.h>
#include<conio.h>
void main ( )
{

float a,b,resultado;
int opcion;
cout<<"\n\t============CALCULADORA==============";
cout<<"\n\t 1. SUMA";
cout<<"\n\t 2.RESTA";
cout<<"\n\t 3. MULTIPLICACION";
cout<<"\n\t 4. DIVISION";
cout<<"\n\t Ingrese una Opcion :";
cin>>opcion;
 if(opcion==1)
 {
 cout<<"\n--------------------------------------------------------";
 cout<<"\n\t SUMA";
 cout<<"\n\t ingrese el primer valor:";
 cin>>a;
 cout<<"\n\t ingrese el segundo valor:";
 cin>>b;
 resultado=a+b;
 cout<<"\n\t la suma es:"<<resultado;
 }
  else if (opcion==2)
  {
  cout<<"\n-------------------------------------------------------";
  cout<<"\n\t RESTA";
  cout<<"\n\t ingrese el primer valor:";
  cin>>a;
  cout<<"\n\t ingrese el segundo valor:";
  cin>>b;
  resultado=a-b;
  cout<<"\n\t la resta es:"<<resultado;
  }
  else if (opcion==3)
  {
  cout<<"\n-----------------------------------------------------";
  cout<<"\n\t MULTIPLICACION";
  cout<<"\n\t ingrese el primer valor:";
  cin>>a;
  cout<<"\n\t ingrese el segundo valor:";
  cin>>b;
  resultado=a*b;
  cout<<"\n\t la multiplicacion es:"<<resultado;
  }
  else if (opcion==4)
  {
  cout<<"\n------------------------------------------------------";
  cout<<"\n\t DIVISION";
  cout<<"\n\t ingrese el primer valor:";
  cin>>a;
  cout<<"\n\t ingrese el segundo valor:";
  cin>>b;
  resultado=a/b;
  cout<<"\n\t la division es:"<<resultado;
  }
  else
  {
  cout<<"\n\t ERROR";
  }
  getch ( );
  }




Leave a Reply

Subscribe to Posts | Subscribe to Comments

bienvenidos a mi blog

Contador de Visitas

Contadores

Contadores de visitas gratis para webCursosContadores de visitas gratis para web

Unordered List

Blogger templates

Con la tecnología de Blogger.

Seguidores

Datos personales

- Copyright © PROGRAMACION Y MAS -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -