
[1m                                *------------*
[1m                                | C Tutorial |
[1m                                *------------*

                                BY  JASON LOWE


[32m   <> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <>
[0m

[33m  IMPORTANT:
  Ok, I'll have to change the format of this small C tutorial due to two
  reasons:

   1) No one submitted any answers to me which meant that I couldn't discuss
      programming techniques and problems of people who where just starting
      out in C.

   2) My free time is becoming smaller and smaller and my interests are
      branching out into other realms.

  [43mSo now I have decided to do the following:[0m

   Set between 3 and 6 questions in each issue of Megadisc to which I'll give
  answers (source code) and a small explanation of the programming techniques
  in the next Megadisc.

   So now I'm not interested in user solutions. This is because I do not
  have much free computer time and I would prefer to make this tutorial
  something that C programmers can use to improve their skills rather than a
  some sort of "help-line". But of course if you're haven't lots of trouble
  with some topic in C I can be reached at this address:

                                              Jason Lowe
                                              PO BOX 154
                                              Berkeley Vale
                                              N.S.W 2259
                                              AUSTRALIA

   Ok, here's some problems for you to attempt yourself. I will not give
  solutions for problems 1 to 8 as they are very simple. If anyone had a lot
  of trouble with any or all of these 8 problems then you should seriously
  consider whether or not C programming is for you.


[43mProblem 9[0m
  Here is a triangle with a height of 4 lines.

      *
     ***
    *****
   *******

   Ask the user for the height and then display the triangle in the above
  fashion. You should reject numbers which aren't between 4 and 60.


[43mProblem 10[0m
  Write a function which returns the next prime number greater than or equal
  to the integer passed to that function. For example,

   - if the integer 10 is passed you should return 11.
   - if the integer 11 is passed you should return 11.
   - if the integer 5 is passed you should return 7.

   Demonstrate your function works by asking the user for the integer to pass
  to this function.


[43mProblem 11[0m
  Roll the first 100 integers down the screen in the following fashion,

1
 2
  3
   4
    5
   6
  7
 8
9
 10
  11
   12
    13
   14
  15
 16
17
 18
  19...


[43mProblem 12[0m
  Ask the user for a sentence and then display the users sentence with all
  vowels replaced with a '#'.


   [43mNEXT TIME[0m
  Next time I'll give solutions to the above problems, a small discussion on
  programming techniques and any other things which may be useful for all who
  wish to develop their knowledge of C.


                                                     Jason Lowe, June '93


[32m   <> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <%> 34 <>
[0m

