Function

help please

write a program which will read price of an item and tax rate.the program will call a function which will calculate the final price of the item. the formula is as follows:

price: item price+ (item price * (tax rate))

The price calculated by the function should be displayed by the main program.
Did you write any code for this yet? It seems pretty straight forward. If you don't know where to start, I suggest looking in your textbook for some similar problems or browsing the Internet for C++ calculation programs.
yeah i've already wrote the program...jst wanted how other write it and compare it to mine
closed account (zb0S216C)
How about you post your code, and we could give tips on how you could improve it.

Wazzak
yeah i can do that...

here it is

# include <iostream>
double display itemprice ();
double display taxrate ();
void main ()
{
double itemprice,taxrate;
double itemprice, itemprice + (itemprice* (taxrate/100))
cout<<"enter itemprice";
cin>>itemprice;
itemprice= itemprice+ (itemprice+ (taxrate/100))
{
double taxrate;
taxrate=taxrate/100;
return itemprice;
}
Topic archived. No new replies allowed.