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,201
Last Active:
User is offline 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
Your Car:
Honda
Dream Kudos:
0
Icon   Cenron has not set their status

Posts I've Made

  1. In Topic: Calculating the sales tax using C

    Posted 4 Feb 2015

    View Postmbilal1, 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);
    return 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

    View Postno2pencil, on 17 July 2014 - 08:32 PM, said:

    View PostCenron, 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.
  4. In Topic: Embarrassing hangman code

    Posted 18 Jun 2013

    Oh man the patience required to write something like this. I don't think I could do it with all that repetition.

My Information

Member Title:
New D.I.C Head
Age:
29 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

Contact Information

E-mail:
Private

Friends

Cenron hasn't added any friends yet.

Comments

Cenron has no profile comments yet. Why not say hello?