entrebits.cl Software & S.O Programación C++

OPERACIONES BÁSICAS EN C++c







Retroceder   entrebits.cl Software & S.O Programación C++
Registrarse Ayuda Miembros Calendario Marcar Foros Como Leídos Tags

C++ Participa, OPERACIONES BÁSICAS EN C++c en el Programación; Este es el código fuente de como hacer una simple calculadora.Bueno desde dejen sus comentarios :jejje bueno nos vemos. #include ...

Respuesta
 
LinkBack Herramientas Desplegado
  (#1 (permalink)) Antiguo
socrates27 Desconectado
Pajarito Nuevo
socrates27 está en el buen camino
 
Avatar de socrates27
 
Mensajes: 39
Agradecimientos: 0
Agradecido 5 veces en 4 mensajes
Fecha de Ingreso: October-2009
Genero: Hombre
Pais:
Post OPERACIONES BÁSICAS EN C++c - 07-Oct-2009, 22:51

Este es el código fuente de como hacer una simple calculadora.Bueno desde dejen sus comentarios:jejje bueno nos vemos.

#include <stdio.h>
#include <conio.h>

void suma();
void resta();
void division();
void multiplicacion();

void suma()
{
int num1=0;
int num2=0;
int suma=0;
clrscr ();
printf ("Ingrese un numero\n",num1);
scanf ("%d",&num1);
printf ("Ingrese otro numero\n",num2);
scanf ("%d",&num2);
suma= (num1 + num2);
printf ("La suma es:%d\n", suma);
}

void resta()
{
int num1=0;
int num2=0;
int resta=0;
clrscr ();
printf ("Ingrese un numero\n",num1);
scanf ("%d",&num1);
printf ("Ingrese otro numero\n",num2);
scanf ("%d",&num2);
resta= (num1 - num2);
printf ("La resta es:%d\n", resta);
}

void division()

{
int num1=0;
int num2=0;
int division=0;
clrscr ();
printf ("Ingrese un numero\n",num1);
scanf ("%d",&num1);
printf ("Ingrese otro numero\n",num2);
scanf ("%d",&num2);
division= (num1 / num2);
printf ("La division es:%d\n", division);
}

void multiplicacion()

{
int num1=0;
int num2=0;
int multiplicacion=0;
clrscr ();
printf ("Ingrese un numero\n",num1);
scanf ("%d",&num1);
printf ("Ingrese otro numero\n",num2);
scanf ("%d",&num2);
multiplicacion= (num1 * num2);
printf ("La multiplicacion es:%d\n", multiplicacion);
}

main ()
{
int op=0;
printf ("Elija una opcion\n");
printf (" 1-Suma\n");
printf (" 2-Resta\n");
printf (" 3-Division\n");
printf (" 4-Multiplicacion\n");

scanf ("%d",&op);


if (op==1)
suma ();
if (op==2)
resta();
if (op==3)
division();
if (op==4)
multiplicacion();
}
   
Responder Citando
Respuesta

Tags
básicas, operaciones

Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
caritas están Activado
[IMG] está Activado
Código HTML está Desactivado
Trackbacks are Activado
Pingbacks are Activado
Refbacks are Activado


Temas Similares
Tema Autor Foro Respuestas Último mensaje
MercadoLibre se quedará con las operaciones de su competidora, DeRemate Arturito Noticias breves 0 27-Aug-2008 01:51
Pautas básicas para el overclock de un procesador. moyachiche Hardware en general 1 24-Jul-2007 17:12



Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Realizado por: diseño web por pymeweb.cl Hosting en Chile por ultrahosting.cl
Creative Commons License
Agregar a favoritos Technorati
© Entrebits.cl