Guest User

Untitled

a guest
Feb 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1.  
  2. #include "stdafx.h"
  3. #include "stdio.h"
  4. #include "conio.h"
  5.  
  6.  
  7. using namespace System;
  8.  
  9. void Dol_a_Sol(float monto)
  10. {
  11.     printf("En soles es:%.2f",monto*2.71);
  12. }
  13.  
  14.     float Sol_a_Dol(float monto)
  15.     {
  16.         return monto/2.77;
  17.     }
  18.  
  19.  
  20. int main(array<System::String ^> ^args)
  21. {
  22.     float dinero;
  23.     int opcion;
  24.     printf("Ingrese monto:");
  25.     scanf("%f",&dinero);
  26.  
  27.     printf("1. Dolares a soles\n");
  28.     printf("2. Soles a Dolares\n");
  29.     printf("Ingrese la opcion\n");
  30.     scanf("%d",&opcion);
  31.  
  32.     if(opcion==1)
  33.         Dol_a_Sol(dinero);
  34.     else
  35.         printf("En dolares es :%.2f",Sol_a_Dol(dinero));
  36.  
  37.  
  38.  
  39.     _getch();
  40.     return 0;
  41. }
Add Comment
Please, Sign In to add comment