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

 

C++ Program #2

 

 

Write a program that uses variables.

These will be assigned, not cin’d into these variables….

              Age(int)

              Weight(double or float)

              Sex(remember to use single quotes for a

 char)

              income( use double)

 

Have a const of rate(for taxes set at 0.05)

                     Const float rate=.05

 

Calculate: kg, tax, days (see chart below)

Use iomanip and the cout.setf’s

 

Produce This Chart

 

My age is 21                                   In days this is 7665

My weight is 210 pounds                       In kg this is 94.5

My sex is m                                     I am humanoid and biped

My income is $244450.35              Tax:$1222.52