I have a program for a C class I need to write. The program asks for a quantity, and I need to multiply that quantity by another variable which the user inputs. Basic calculator script for a c class :)
I have it set up like this,
int qty; //basic quantity var
float euro, euro_result;
//assign values to my float vars
euro = .6896; //Euro Dollars
euro_result = euro * qty; // Euro Dollars multiplied by user input qty
//start program for user
printf("Enter a quantity: ");
//alow user to input a quantity
scanf("%d", &qty);
printf("Euro: %f \n", euro_result);
Why does it not work as expected?