Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 234 Weeks Ago |
Questions Answered: | 12843 |
Tutorials Posted: | 12834 |
MBA, Ph.D in Management
Harvard university
Feb-1997 - Aug-2003
Professor
Strayer University
Jan-2007 - Present
using this C programing code I have trouble getting an output (which should be the solution of price with tax)... Why am I not getting an output wtih my code?
Â
Â
///C code
//this program will calculate the set price of an object.
//developer: UMUCstudent
//date: 25 June, 2017
#include <stdio.h>
Â
int main()Â
{
/*variable definition: */
float set_price, price, sales_tax;
/*promt user for price */
printf("Enter price in dollars: 253.00 n");
//input price
scanf("%f", &price);
/*prompt user for sales_tax */
printf("enter state sales_tax: .06 n");
//Input sales_tax
scanf(" %f", &sales_tax);
//calculate the sales_tax = price + (price * sales_tax);
Â
//Input set_price
printf("price with tax is: %fn", set_price);
Â
return 0;
}
-----------