PROG1347 C Assignment #1 (Extend-O-Credit eligible)


Category: You will Instantly receive a download link for .zip solution file upon Payment


5/5 - (3 votes)

Important Topics

• Variables and Data Types
• Operators
• Creating a VS Project
• Following assignment requirements
• Submitting according to the SET Submission Standards

Functional Requirements

• Display the alphabet on the screen, one letter on each line. Next to each letter, each line
should also contain an average (obtained through the use of a running total) of all letters
displayed in the left-hand column up to that point.

o You must use a running total to calculate the average. No other method is
• The average should be displayed in a right-hand column as an integer if the current letter
is your first initial and as a character otherwise.
o Don’t worry about rounding or truncation of the average.

Other Requirements

• Comment and indent your program well.
• Choose good names for your variables.
• Make sure that you have a header comment at the top of your program indicating your
name, the filename, the date, and brief description of the program. You must model your
file header comment’s format to be similar to that in the SET Coding Standards or the
Course Notes.

• You must use a loop of some kind (e.g. while).
• Do not use more than three printf() (or other output) statements.
o The reason for this is that I don’t want you handing in a solution with 26 printf()
statements because you don’t want to use a loop. Doing something like this will
result in a mark of 0.
• This program does not take any input from the user. It does not ask for your initial.
o Create a constant for your initial.
• Use the SET Coding Standards (found on eConestoga) that are relevant.

File Requirements

• Call your project cA1.
• Call your source code file cA1.c or cA1.cpp to generate cA1.exe.
• Submit your ZIP file as described in the lecture on the SET Submission Standards into
the “Assignment 1 (not 1A)” assignment submission folder.
It is important to note that you can hand in a program that works perfectly and still get a
failing mark because you don’t follow the requirements.

Sample output if your first name is Carlo:
a a
b a
c 98
d b
e c
f c
g d
h d
i e
j e
k f
l f
m g
n g
o h
p h
q i
r i
s j
t j
u k
v k
w l
x l
y m
z m
If your first name was Sam, the 98 would be replaced by a letter ‘b’ and the ‘j’ next to the ‘s’
would be replaced by the ASCII value of the character ‘j’.