I am trying to write my first program to calculate a 6% sale tax on a purchase. i need help setting up the variable and calculation
I am trying to write my first program to calculate a 6% sale tax on a purchase. i need help setting up the variable and calculation
Show us what you've done so far, so that we can guide you.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
You need a variable with a cost in it.
You need to multiply that by 0.06 and then add to said variable.
Questions?
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Now you have the idea. Post some code. You have to try to do this yourself!!!
Mr. C.
Psuedo codeCode:#include <stdio.h> int main ( void ) { Setup a variable for price of purchase Setup a variable for purchase total Ask for input; the price of the purchase, and store it in the variable Multiply the purchase variable * .06, and store the answer in the variable total Print the variable total return 0; }
The world is waiting. I must leave you now.