how to write this program

This is a discussion on how to write this program within the C Programming forums, part of the General Programming Boards category; I am taking a course in C language and have a practice assignment that I can't figure out. Here it ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    1

    how to write this program

    I am taking a course in C language and have a practice assignment that I can't figure out. Here it is (how do I do this?):

    Write a program that displays the characters A through G and their values using a while loop to repeat and printing.
    Sample output:
    The numeric value of A is 65.
    The numeric value of B is 66.
    The numeric value of C is 67.
    The numeric value of D is 68.
    The numeric value of E is 69.
    The numeric value of F is 70.
    The numeric value of G is 71.

    Thank you for your help!

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    2,917
    What have you tried? What don't you understand?

    Jim

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Look at what your output is supposed to be. See what is repeated in each line (that's a good hint at using a loop). See what is different. Compare the differences between lines, and see what you need to do from one line to the next to make that difference happen. See if there's a pattern there, and if so, do that in a loop. If you have never used a loop because you were busy sleeping instead of taking your class, you should read the loops tutorial on the site.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to write a program for...
    By babyboy in forum C Programming
    Replies: 20
    Last Post: 02-19-2008, 06:01 AM
  2. How to write a program for...
    By babyboy in forum C Programming
    Replies: 6
    Last Post: 02-15-2008, 06:17 AM
  3. I need to write a program !!!
    By alone2002dj in forum C Programming
    Replies: 2
    Last Post: 12-12-2007, 01:22 AM
  4. Anyone help me write this program better?
    By VegasSte in forum C Programming
    Replies: 2
    Last Post: 11-27-2002, 11:42 AM
  5. Help Write This Program Plz
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 10-13-2001, 02:08 AM

Tags for this Thread


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