Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // soles a dolares.cpp : main project file.
- #include "stdafx.h"
- #include "stdio.h"
- #include "conio.h"
- using namespace System;
- void dol_a_sol(float monto)
- {
- printf("en soles es %.2f",monto*2.71);
- }
- void Sol_a_Dol(float monto)
- {
- printf("en dolares es %.2f",monto/2.77);
- }
- int main(array<System::String ^> ^args)
- {
- float dinero;
- int opcion;
- printf("ingrese monto:");
- scanf("%f",&dinero);
- printf("1.- Dolares a soles:\n ");
- printf("2.- Soles a Dolares:\n");
- printf("Ingrese la opcion:\n");
- scanf("%d",&opcion);
- if(opcion==1)
- dol_a_sol(dinero);
- else
- Sol_a_Dol(dinero);
- _getch();
- return 0;
- }
Add Comment
Please, Sign In to add comment