## Cenron's Profile User Rating:

Reputation: 6 Worker
Group:
New Members
Active Posts:
15 (0.01 per day)
Joined:
23-May 12
Profile Views:
2,634
Last Active:
Feb 15 2015 07:39 PM
Currently:
Offline

### Previous Fields

Country:
Who Cares
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
AMD
Favorite Gaming Platform:
XBox
Honda
Dream Kudos:
0
Cenron has not set their status

1. #### In Topic: Calculating the sales tax using C

Posted 4 Feb 2015

mbilal1, on 04 February 2015 - 10:24 PM, said:

I'm trying to create a program in C, which asks the use for a price of an item. It then calculates the sales tax, and prints out: the original price, the tax, and final price w/ tax. For some reason I continue to get an error on this.

```#include <stdio.h>
#include <stdlib.h>
#define SALES_TAX 0.05

int main()
{
double price=0.00, tax=0.00, total_cost = 0.00;
printf(“Enter price of item:\n”);
scanf(“%f”, \$price);

tax = price*SALES_TAX;

total_cost=price+tax;
printf(“The Original cost was= %f”, price);
printf(“The Tax was= %f”, tax);
printf(“The Total Cost is = %f”, total_cost);

}

```

Well it looks like in your main function you declared an int, but your trying to return a double. As part of the program entry ( the int main function ) just do a return 0. Why are you returning the total cost? I guess you could use another program to read the return value, but I don't really see the point.

Also posting the error would be very helpful.
2. #### In Topic: OHMIGOD I JUST FIXED A VERY SERIOUS COMPRESSION PROBLEM!

Posted 24 Jul 2014

no2pencil, on 17 July 2014 - 08:32 PM, said:

Cenron, on 17 July 2014 - 10:21 PM, said:

But obviously a troll.

Says the guy digging up a year old topic...

Ha didn't realize that lol. I guess this forum doesn't get a whole lot of posts cause it was still near the top.
3. #### In Topic: OHMIGOD I JUST FIXED A VERY SERIOUS COMPRESSION PROBLEM!

Posted 17 Jul 2014

Oh man! this is hilarious. But obviously a troll.

### My Information

Member Title:
Age:
30 years old
Birthday:
October 20, 1985
Gender:
Location:
127.0.0.1
Years Programming:
10
Programming Languages:
C/C++, PHP, Python, Java, ASM, MySQL, HTML, CSS, Java Script

E-mail:
Private

### Friends

Cenron hasn't added any friends yet.