viernes, 16 de noviembre de 2018

PROGRAMA DE CONVERSION


PROGRAMA DE CONVERSION

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

int main ()
{
                int op;
                float quet,pes,eur, dol, total;
                printf("\n MENU PRINCIPAL DE CONVERSION");
                printf("\n 1- QUETZALES A DOLARES");
                printf("\n 2-CONVERTIR QUETZALES A PESOS");
                printf("\n 3- CONVERTIR QUETZALES A EUROS");
                printf("\n Ingrese su opcion:");
                scanf("%d", &op);         
               
               
                if (op==1)
                               {
                               printf ("\n CONVERTIR QUETZALES A PESOS");
                               printf ("\n INGRESE CIFRAS EN QUETZALES:");
                               scanf ("%f", &quet);
                               printf ("\n INGRESE EL CAMBIO ACTUAL:");
                               scanf ("%f", &dol);
                               total = quet*dol;
                               printf("\n LA CANTIDAD EN DOLARES ES: %.3f", total);
                }
               
                if (op==2)
                               {
                               printf ("\n CONVERTIR QUETZALES A PESOS");
                               printf ("\n INGRESE CIFRAS EN QUETZALES:");
                               scanf ("%f", &quet);
                               printf ("\n INGRESE EL CAMBIO ACTUAL:");
                               scanf ("%f", &pes);
                               total = quet*pes;
                               printf("\n LA CANTIDAD EN PESOS MEXICANOS ES: %.3f", total);
                }
               
                if (op==3)
                               {
                               printf ("\n CONVERTIR QUETZALES A PESOS");
                               printf ("\n INGRESE CIFRAS EN QUETZALES:");
                               scanf ("%f", &quet);
                               printf ("\n INGRESE EL CAMBIO ACTUAL");
                               scanf ("%f", & eur);
                               total = quet*eur;
                               printf("\n LA CANTIDAD EN EUROS ES: %.3f", total);
                }
                return 0;
}

No hay comentarios.:

Publicar un comentario