/Less_or_more

My first programme in C

Primary LanguageC

Less_or_more

My first programme in C


How play ?

gcc main.c ; ./a.out

Have a good time.


History.

When I start programing in C, i knew that I need practise to leanr, and what better then write a mini-game ?

For this reason I started with Less_or_more the most simple game ever.

Yes it's simple, but not when you have to do it in language you don't know.

What did I learn in the first version ?

  • How to compile C file
  • What is an header file (librairy)
  • While, do while, if, else if
  • Switch
  • Srand (how get a random number)
  • Printf
  • Scanf

Three days after learning and training C langage, I decided to add new stuffs on it.

So I create the V2. What did I add to it ?

I didn't add new functions, but I learned how to write a clean code.

My first version contained 113 lines.

The V2 ? just 64 lines, but cleaner.

Thanks You for reanding it, if someone do it one day...