Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Help with pset1 error
Post Flair (click to view more posts with a particular flair)
Post Body

I'm on pset1 and I had one error where the ( or { was missing and I found out I just had to remove the ; after int main(void). But now I'm getting the error below. Can someone help me out?

Thanks!

Edited to add get_cents function

Here is the code in question:

int get_cents(void); do { get_int ("Please input the change to be returned: "); } while (get_cents <= 0); int coins = 0;

int calculate_quarters(int cents);
while (get_cents >= 25)
{
get_cents -= 25;
coins ;
}

Here is the error:

cash.c:84:22: error: ordered comparison between pointer and integer ('int (*)(void)' and 'int') [-Werror] while (get_cents >= 25)

Author
Account Strength
90%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
4,897
Link Karma
3,100
Comment Karma
1,673
Profile updated: 6 days ago
Posts updated: 5 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago