Guest User

Untitled

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