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

                                BY  JASON LOWE


[32m   ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[


[33m  IMPORTANT:
  On my three disk set of the HCC C compiler ( Megadisc's PD disks UT 337 A,B
  & C) I have detailed doc files on various topics in C which will be the
  topics found in this tutorial spanning over many Megadiscs. Hence I will
  not discuss these topics in this tutorial and ones to follow but rather
  just give questions and discuss the answers and programming techniques of
  the users who attempt my questions and send them to me.


    Here is what will be covered in this text file,

    --> Reader Questions
    --> Questions for you to attempt yourself
    --> Hints and tips in programming in C


                           [43mReader Questions[0m

    (These questions are directed at myself)

    Q: Are you willing to answer any questions concerning C?
    A: This tutorial is a COMPLETE BEGINNERS TUTORIAL. I have no qualms
       in answering questions from beginners about information found in
       these articles written by myself. If you want some detailed info
       on various toics in C (ie, you're not a beginner) check out Anders
       Bjerin's C Manual (Fish 691-695). Then if you want help with any
       advanced topics contact Anders. You can contact me but I can't
       guarantee to answer your questions as I am only self taught.

    Q: Will your tutorial be covering graphics?
    A: No. This tutorial will cover the utmost basics of C and nothing
       else. This tutorial is aimed at giving those interested in C a
       big push so they can be learning C in no time at all. Once you
       have finished this tutorial you should then check out external
       sources of C code and branch into whatever direction you are
       interested in.

    Q: How complicated is it to use an IFF picture as a background in C?
    A: If you want to create ALL the code yourself it would be very tedious
       and hard work. However, some people specialize in various programming
       topics. What I mean by that is that someone may have written some
       brilliant IFF picture routine for anyone to use. Another person may
       have written some brilliant music routine for playing soundtracker
       modules. Thus, if you want to incorporate music in your program or
       manipulate graphics your can examine other peoples code and use
       their routines.


                               [43mQUESTIONS[0m

    NOTE: When submitting your solutions to me name your source code
          'problem1.c', 'problem2.c' etc...

        In the previous tutorial I said that only topics 2 and 3 would be
        discussed in this tutorial. Well, to get things rolling a little
        here we have questions on topics 2,3,4 and 5. So examine the doc
        files on these topics and have a go at these problems.


    PROBLEM 1:

             Ask the user for an integer and then display what double
             and treble that integer is.


    PROBLEM 2:

             Ask the user for an integer and then display the next two
             integers after the users integer across the screen with a
             comma separating both numbers.


    PROBLEM 3:

             Ask the user for an integer and then display what the last
             digit of that integer is.


    PROBLEM 4:

             Sum all the integers from 99 to 999 using a for loop and a
             while loop.

    PROBLEM 5:

             Ask the user for an integer greater than zero and then display
             how many digits where in that number.

    PROBLEM 6:

             Using a for loop count backwards down the screen from 100
             to 1.

    PROBLEM 7:

             Ask the user for a positive integer and then display whether
             or not that positive integer is a prime number.

    PROBLEM 8:

             Sum the first 30 prime numbers and display the result.
             NOTE: 1 is not a prime.



                            [43mHINTS AND TIPS[0m

  --> Enjoy yourself when programming in C or any language for that matter.
      Some people feel they want to become programmer and push themselves
      too hard. If you try this tutorial and find it too hard or too much
      hard work pick up another hobby which dosen't require so much brain
      power.

  --> If you find these tutorials too easy why not examine some later topics
      on disk 3 of my HCC C compiler setup and teach yourself C by reading
      the doc files and attempting the questions at your own leisure.


                               [43mNEXT TIME[0m

    Next time I will discuss programming techniques of the solutions sent
   in by the users who attempt problems 1 to 8. Don't panic if you can't
   do a particular problem. Just examine the solutions next time and try
   again. Also, even if your solutions don't work or crash the system etc..
   please send them to me. We will not laugh at them but rather learn by
   your mistakes.

                                                      Jason Lowe
                                                      January '93


[32m   ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[ ]] 32 [[


