Answer:
In C:
#include <stdio.h>
int main(){
float won,usd,rupee,dinar,peso;
printf("Won: ");
scanf("%f", &won);
usd = won * 0.85/1000;
rupee = won * 0.85 * 0.14/1000;
dinar = won * 0.85 * 0.048/1000;
peso = won * 0.85 * 1.41/1000;
printf("USD = %f\n", usd);
printf("Rupee = %f\n", rupee);
printf("Dinar = %f\n", dinar);
printf("Peso = %f\n", peso);
return 0;
}
Explanation:
This declares all variables as float
float won,usd,rupee,dinar,peso;
This prompts the user for Korean Won
printf("Won: ");
This gets the input for won
scanf("%f", &won);
This converts to usd
usd = won * 0.85/1000;
This converts to rupee
rupee = won * 0.85 * 0.14/1000;
This converts to dinar
dinar = won * 0.85 * 0.048/1000;
This converts to peso
peso = won * 0.85 * 1.41/1000;
The next four lines print the converted currencies
printf("USD = %f\n", usd);
printf("Rupee = %f\n", rupee);
printf("Dinar = %f\n", dinar);
printf("Peso = %f\n", peso);