Guest User

Untitled

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