Professional Documents
Culture Documents
Write a program that reads a number N and outputs the shape of a tornado of size N. The following are
examples:
******* **** *
******* **** *
****** ***
****** ***
***** **
***** **
**** *
**** *
***
***
**
**
*
*
Question 7:
Write a program that prints the shape of a square of N x N using (dots(.) , digit 1 and digit 2 )
for the given input N. Both diagonals of the square will be represented by dots. The dots of
the diagonals will separate the square into 4 triangles (upper, left, right and lower). Right and
upper triangles will be represented by ones, while left and lower will be represented by twos. For
example, if the input is 9 then the function should print the following: (Your function should
generate any square for given N)
.1111111.
2.11111.1
22.111.11
222.1.111
2222.1111
222.2.111
22.222.11
2.22222.1
.2222222.
Write a C program that reads grades for an unknown number of student. Your program must do the
following
Q8
23
345
4567
56789