Ceng198

Introduction to Computer Programming

Lab#3



Part I. Introduction to “whileRepetition Statement

Compile and run the following program. Analyze the output.





Part II. Nested Control Structures

Modify the code above so that









Part III. Do It Yourself

Write a program that

Total Grade = First Midterm * 0.25 + Second Midterm * 0.25 + Final * 0.5

Grade (0-100)

Letter Equivalent

90-100

AA

85-89

BA

75-84

BB

70-74

CB

60-69

CC

55-59

DC

45-54

DD

25-44

FD

0-24

FF





Part IV. Do It Yourself

Modify the previous program as;

Student 1 got 50 --> DD

.

.

.

Class average is .....

Part V. Do It Yourself

Write a complete C program to do following tasks: