09-15-2005, 04:51 PM
|
#11
|
Away from Computer
Join Date: Sep 2003
Location: Massachusetts
Age: 33
Posts: 1,901
|
RE: C++ Help
after getting some rudimentary C++ syntax help <_<
Code:
#include <iostream>
main()
{
float oprice, taxrate, markup,fprice,sprice,tax;
cout<<"print the original price, tax rate percentage, and markup percentage";
cin>>oprice>>taxrate>>markup;
sprice = oprice * (1 + (markup/100) );
taxprice = sprice * (1 + taxrate/100);
fprice = sprice + taxprice;
cout<<"original price is",oprice;
cout<<"markup is",markup;
cout<<"taxrate is",taxrate;
cout<<"store price is",sprice;
cout<<"sales tax is",tax;
cout<<"final price is",fprice;
}
I don't know whether you need to do int main or void main
and also I don't know what lib to include
is it #include <iostream> ?
this should be slightly less way different, I hope <_<
EDIT: Edited in iostream
__________________
|
|
|