1. ## Post your beginner/intermediate level C programming exercises here

Hello,
I am trying to practice C programming on a regular basis... My professor gave everyone quite a few practice programs to work on. I finished all of them and was hoping for some you the forum members to post some good exercises that will improve beginner/intermediate level C programmers cover concepts such as: loops, arrays, i/o files, structs, recursion, link lists, functions, etc...

I will post some good ones myself in a short while.

2. flame deleted.

3. Sorry for the duplicate threads, my computer froze then when I clicked submit it somehow created multiple new threads, please delete the extras.

4. Originally Posted by Char*Pntr
What are you nuts?

Since you had enough intelligence to make it this far, how about going one more step:

----> Cprogramming.com FAQ
Since you had enough intelligence to read my post, I asked for people to post practice program ideas. There arent any practice program ideas there.

5. Here are some practice program ideas:

1)Write a program that allows a user to play a guessing game. Pick a random number in between 1 and 100, and then prompt the user for a guess. Based on their guess, then them that their guess is too high, too low, or correct. If the guess is not correct, reprompt the user for a new guess. Continue doing so until the user has properly picked the number.

2)A file nintendo.in contains a single non-negative integer on each line representing donations (in dollars) to your Nintendo game buying fund. The end of the list will be signified by the value 0 on the last line of the file. (All other integers in the file will be positive.) A Nintendo game costs \$50 to buy. Read in the file of donations and output a statement listing the maximum number of games you can buy as well as how much money you will have left over after buying that many games.

3)Write a program that reads a set of dart throws from a user and computes the user's score. Assume that the user enters 21 dart throws and each throw is a single integer in between 1 and 20, inclusive. To compute the user's score, look at each number in between 15 and 20, inclusive that the user threw more than three times, and add up the points of the throws, after the third throw. For example, if the user throws 5 20s, 3 19s, 4 18s, 6 14s and 2 1s, then the user's score is 2x20+1x18 = 58, since the user threw 2 more 20s than 3 and 1 more 18 than 3. The 14s don't count since only 15 through 20 count for points.

6. deleted

7. Originally Posted by Char*Pntr
If you can't think of anything to code up using a homework, or something out of a textbook, then I really feel sorry for you.
Where the hell is this coming from?

What exactly is the material difference between an exercise from a book and an exercise posted by one of the community members here?

8. deleted

9. << This and that, water under the bridge. Moving on >>

10. Adak, I trust you and I think you're right. I'm sorry to everyone - Really, if the OP was serious, it should have been posted in the General forum. This was not a C specific question and I lost my temper.

I apologize to everyone. Thanks Adak for your input, up until now, your thoughts on this was the only thing that made sense to me. Maybe you should be promoted to a mod here.

Adak, if you'd like I can think of some programming examples to post on this thread.

11. If you have some programming examples you'd like to post, please go ahead.

If you have some programming examples you'd like to post, please go ahead.
I just now deleted all of my replies. It's late here, and I will post some examples here tomorrow.
I'm reading K & R 2nd edtion, it's pretty enlightening.

13. Since when has this forum become so hostile?

If you just had a bad day, don't take it out on some random person on the internet. That's irresponsible.

This thread does not deserve that kind of rude response.

It's a genuine question by an inquisitive person. If you can't help, just move on to the next thread.

To op:
Judging by the examples you posted, I'm guessing you like more algorithmically challenging problems?

Programming competition practice problems could be a good place to start -
Try USACO, Canadian Computing Competition, IOI (this one is VERY challenging, most experienced/professional programmers won't be able to get most of the questions), or project Euclid.

If you are a beginner in C they will be a little challenging, but challenges are good .

14. There are plenty of old homework questions posted on this (and many other) forums. How about reading them and seeing if you can do them? Don't bother to post the complete answer, just feel good that you know how to solve it.

Also google "programming contests". There are sites with lots of problems, and automated checking of your answer.

15. Originally Posted by Char*Pntr
deleted
Why waste your time on responding to this thread if you are not going to be helpful? to try and make someone feel dumb over the internet...?? thats stupid. I feel sorry for YOU my friend.

Move along...