Ejemplos basicos de turbo c++

Páginas: 20 (4983 palabras) Publicado: 11 de septiembre de 2012
bEMPIEZO CON UN PROGRAMA QUE TIENE DOS PROGRAMAS EN UNO; EL PRIMERO CALCULA EL NUMERO DE PULSACIONES DEL CORAZON Y LA SEGUNDA OPCION UN PROGRAMA QUE DA OPCIONES DE JUBILACION SEGUN EDAD Y ANTIGUEDAD UTILIZANDO "SWITCH" E "IF"
-------------------------------------------------
#include<stdio.h>
-------------------------------------------------
#include<conio.h>-------------------------------------------------

-------------------------------------------------
void main()
-------------------------------------------------
{
-------------------------------------------------
int op,sex,an,edad;
-------------------------------------------------
float npu,ed;
-------------------------------------------------
clrscr();-------------------------------------------------
printf("BIENVENIDO ELIJA UN PROGRAMA PORFAVOR: ");
-------------------------------------------------
printf("\n\n 1. CALCULADOR DE PULSACIONES");
-------------------------------------------------
printf("\n\n 2. OPCION DE JUBILACION\n");
-------------------------------------------------
scanf("%d",&op);
-------------------------------------------------
switch(op)-------------------------------------------------
{
-------------------------------------------------
case 1:
-------------------------------------------------
printf("\n\n A ELEJIDO CALCULADOR DE PULSACIONES");
-------------------------------------------------
printf("\n\n ELIJA SU SEXO TECLEANDO EL NUMERO DE LA OPCION\n");
-------------------------------------------------printf("\n\n 1. MUJER\n 2. HOMBRE\n");
-------------------------------------------------
scanf("%d",&sex);
-------------------------------------------------
printf("\nTECLEE SU EDAD: ");
-------------------------------------------------
scanf("%f",&ed);
-------------------------------------------------
switch(sex)
-------------------------------------------------
{-------------------------------------------------
case 1:
-------------------------------------------------
npu=(220-ed)/10;
-------------------------------------------------
printf("\nSU NUMERO DE PULSACIONES ES DE : %f",npu);
-------------------------------------------------
break;
-------------------------------------------------
case 2:-------------------------------------------------
npu=(210-ed)/10;
-------------------------------------------------
printf("\nSU NUMERO DE PULSACIONES ES DE : %f",npu);
-------------------------------------------------
break;
-------------------------------------------------
}
-------------------------------------------------
break;
-------------------------------------------------
case 2:-------------------------------------------------
printf("\n USTED A ELEJIDO OPCION DE JUBILACION");
-------------------------------------------------
printf("\n\n Porfavor introduza su edad: ");
-------------------------------------------------
scanf("%d",&edad);
-------------------------------------------------
printf("\n\n Porfavor introduzca la antiguedad solo en a¤os en sutrabajo: ");
-------------------------------------------------
scanf("%d",&an);
-------------------------------------------------
if(edad>59 && an<=24)
-------------------------------------------------
{
-------------------------------------------------
printf("\nUSTED PUEDE JUBILARSE POR EDAD");
-------------------------------------------------
}-------------------------------------------------
if(edad<60 && an>=25)
-------------------------------------------------
{
-------------------------------------------------
printf("\nUSTED PUEDE JUBILARSE POR ANTIGUEDAD JOVEN");
-------------------------------------------------
}
-------------------------------------------------
if(edad>59 &&...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Ejemplo de turbo c++
  • Ejemplos de programas basicos en c++
  • Turbo C
  • Estructura basica de turbo c++
  • Turbo c
  • turbo c
  • Turbo c
  • turbo c++

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS