Get any value and ask the user if this value is in dollars or in reais. If they are dollars, convert them to reais. If they are real, convert them to dollars. Repeat the operation until the sum of the values entered is greater than 10,000.
#include <stdio.h>
#include <conio.h>
int main(){
float x,dr, xf, xs=0;//numero inserido, dolar ou real, numero convertido, conversao somada
while(xs<=10000){
printf("Digite o valor");
scanf("%f",x);
printf("Digite 1 para converter para dolar, e 2 para converter para real");
scanf("%f",dr);
if (dr=1) {
xf=x*3.58;
prinft("O valor em dolar e %.2f",x);
}
if (dr=2){
xf=x/3.58;
printf("O valor em reais e %.2f",x);
}
xs=xs+xf;
}
getch();
return 0;
}