CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

#include "franca.h"

void mainprog() //c3store1.cpp

{

float price,change,amount,tax=8.25;
price=ask("Input the price:");
price=price+price*tax/100;
Cout<<price;
//
amount=ask("Enter the amount:");
while (amount<price)
{
amount=ask("Not enough, re-enter amount:");
}
change=amount-price;
Cout<<change;

}