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