Ask coding questions

← Back to all posts
code problem
BevieRosie (0)

how to convert dollar rate to peso rate? a user must input a dollar or number or amount and the result should in peso. im kinda confuse if i use if, loop or while loop.

vedprad1 (860)

Do you mean that you want the program to keep asking the user for more conversions?

Zavexeon (1033)

That's just a simple conversion.

float dollar = /*your dollar amount here*/;
float peso = dollar * 19.40;

std::cout << peso;