Date: Tue, 14 Jan 1997 23:00:21 GMT
Server: NCSA/1.5
Content-type: text/html
BU CLA CS 111: Intro CS I---Homework 2
Homework 2---due Tue 94.09.27
Unless otherwise noted, please submit a listing of each program you
write for this homework, and one script that shows that all
of your programs compile properly, and run as intended.
Problems labelled as "Extra-credit/Honors" are required only of honors
students, and are optional for everyone else.
As usual, homeworks are due at the beginning of class.
-
The following program writes a large letter
I
on the
screen:
#include <stdio.h>
#define HEIGHT 17
main()
{
int i = 0;
printf("\n\nIIIIIII\n");
while (i < HEIGHT)
{
printf(" III\n");
i = i + 1;
}
printf("IIIIIII\n\n\n");
}
-
Type, compile, and run this program
-
Describe in a sentence or two of your own words what the program
does.
-
Write a similar program that prints a large letter
C
on the screen.
-
(Extra-credit/Honors)
Write a program that prints an X
(the letter) that is 25
lines high, using as few printf
statements as you can.
-
[KP92, page 35, problem 4]
In this problem, you need only submit a hand-written list of the
compilation errors generated as a result of each of the
six modifications.
-
[KP92, page 39, problem 12]
-
(Extra-credit/Honors)
[KP92, page 39, problem 13]
Abdelsalam Heddaya
Created: 1994.09.19
Updated: 1994.09.26