// REPUBLICA BOLIVARIANA DE VENEZUELA
// MPPE UNIDAD EDUCATIVA FE Y ALEGRIA ROCA VIVA
// EJERCICIO DE LENGUAJE BORLAND C++
// PROFESOR:JULIAN A MADRIZ O
// LABORATORIO DE COMPUTACION 2
// PGINA WEB https://sites.google.com/site/poderinformaticogg/
// El siguiente código es para hacer un software,
// que calcula el interés Simple Is, El capital inicial Ci,
// La tasa de Interés, y el tiempo transcurrido.
// Parte 1 definir las variable a utilizar.
// #include<windows.h> Esta libreria permite ejecutar instrucciones del SO
// Ejemplo cls para limpiar pantalla
// El estudiante debe analizar el codigo, y completar los proceso que realizara el algoritmo
// Tenga pendiente que las etiquetas definen los sub-programas
// Ejemplo de etiqueta aprobado:
#include<stdio.h>
#include<conio.h>
#include<windows.h>
main()
{
float dato1;
float dato2;
float dato3;
float resultado;
int opciones;
menu:
system("cls");
printf("\n\n\t\t CALCULADORA DE CONTABILIDAD");
printf("\n\n\t\t MENU PRINCIPAL");
printf("\n\n\t\t ===========================");
printf("\n\n\t\t 1.-CALCULO INTERES SIMPLE");
printf("\n\n\t\t 2.-CALCULO CAPITAL INICIAL");
printf("\n\n\t\t 3.-CALCULO TASA DE INTERES");
printf("\n\n\t\t 4.-CALCULO TIEMPO INVERTIDO");
printf("\n\n\t\t 5.-SALIR DEL SISTEMA");
printf("\n\n\t\t ===========================");
printf("\n\n\t\t INDICA UNA OPCION : ");
scanf("%i",&opciones);
if(opciones == 1)goto interes;
if(opciones == 2)goto capital;
if(opciones == 3)goto tasa;
if(opciones == 4)goto tiempo;
if(opciones == 5)goto salir;
if(opciones < 1 ||opciones >5);
{
printf("\n Debe indicar una opcion Valida en elMenu :");
goto menu;
interes:
// Aquí se realiza el proceso del CALCULO INTERES SIMPLE
if(opciones==1)
{
system("cls");
printf("\n\n\t\t CALCULO INTERES SIMPLE");
printf("\n\n\t\t _______________________");
printf("\n\n\t\t Ingrese el Capital Inicial=");
scanf("%f",&dato1);
printf("\n\n\t\t Ingrese la tasa de Interes=");
scanf("%f",&dato2);
printf("\n\n\t\t El tiempo transcurrido=");
scanf("%f",&dato3);
system("cls");
resultado=(dato1*dato2*dato3)/100;
printf("\n\n\t\t EL INTERES SIMPLE ES = %3.f",resultado);
getch();
goto volver;
}
// goto volver;
capital:
// Aquí se realizará el proceso del CALCULO CAPITAL INICIAL
if(opciones==2)
{
system("cls");
printf("\n\n\t\t CALCULO CAPITAL INICIAL");
printf("\n\n\t\t _______________________");
getch();
}
goto menu;
tasa:
// Aquí se realizará el proceso del CALCULO DE LA TASA DE INTERES
if(opciones==3)
{
system("cls");
printf("\n\n\t\t CALCULO DE LA TASA DE INTERES");
printf("\n\n\t\t _____________________________");
getch();
}
goto menu;
tiempo:
// Aquí se realizará el proceso del calculo del TIEMPO INVERTIDO
if(opciones==4)
{
system("cls");
printf("\n\n\t\t CALCULO TIEMPO INVERTIDO");
printf("\n\n\t\t ________________________");
getch();
}
goto menu;
volver:
// A partir de la etiqueta volver se ejecutan una serie si (if) anidados.
printf("\n\n\t\t PARA SALIR DEL SISTEMA (1) o (2) REGRESAR AL MENÚ");
scanf("%i",&opciones);
if(opciones<1 || opciones>2)
{
printf("\n Debe indicar una opcion Valida en el Menu :");
getch();
goto volver;
}
if(opciones==1)
{
goto menu;
}
if(opciones==2)
{
salir:
{
system("cls");
printf("\n\n\n\t ===========================");
printf("\n\n\n\t Fin Programa ");
printf("\n\n\n\t ");
printf("\n\n\n\t ===========================");
getch();
system("cls");
}
}
}
}