Site hosted by Angelfire.com: Build your free website today!

 

 

 

 

 

 


Follow the example on the fat ditto’s first page comage.cpp.

Text Box: Example
#include <iostream.h>
void main( )
{
  float g1, g2, g3;  //variables to hold student grades

cout<< “What grade did the first student get?”;
cin>>g1;
cout<<”What grade did the second student get?”
cin>>g2;
cout<<”what grade did the third student get?”
cin>>g3

float ave= (g1+g2+g3)/3.0;
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Have a float variable, call it tax_rate that is set equal to 0.06 (6%)

 

Have a variable, call it tax_amt, also a float.

 

Have another, call it price.

 

Have your program get the price of the object- “Please enter the price of object

 

Have the program calculate the final_price (also a float)

 

Price: $12.50

Tax: $.75

            (tax rate is .06)

Please pay this amount: $13.25.

 
Print results like this…