0% found this document useful (1 vote)
730 views

Lab Report 3 - Ece Programming

This document summarizes Experiment 3 of the introductory C programming laboratory course at Universiti Teknologi Mara. The experiment objectives are to use increment, decrement, and assignment operators, as well as while, for, do-while repetition statements and break and continue controls to execute code repeatedly. Listings 3-1 through 3-5 present code samples, and Exercises 1, 3 and 4 provide practice problems. The discussion explains how the code works, and the conclusion is that this lab helps automate calculations and reduces errors, demonstrating the usefulness of programming.

Uploaded by

Syed Mohammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
730 views

Lab Report 3 - Ece Programming

This document summarizes Experiment 3 of the introductory C programming laboratory course at Universiti Teknologi Mara. The experiment objectives are to use increment, decrement, and assignment operators, as well as while, for, do-while repetition statements and break and continue controls to execute code repeatedly. Listings 3-1 through 3-5 present code samples, and Exercises 1, 3 and 4 provide practice problems. The discussion explains how the code works, and the conclusion is that this lab helps automate calculations and reduces errors, demonstrating the usefulness of programming.

Uploaded by

Syed Mohammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

FACULTY OF ELECTRICAL ENGINEERING

UNIVERSITI TEKNOLOGI MARA

INTRODUCING TO C PROGRAMMING LABORATORY


(ECE 126)
EXPERIMENT 3
REPETITIVE STATEMENT

LECTURERS NAME:
DR.HAJAR BINTI JAAFAR

GROUP MEMBERS NAME:


1

OBJECTIVES

MUHAMMAD IQBAL MUQRI BIN ROZLAN


2 NIK FAISAL BIN NIK AZMI
3 MUHAMMAD ASYRAF BIN SHAARI

1. To understand and use the increment, decrement and assignment operators.


2. To use the while repetition statement to execute statements in a program repeatedly.
3. To use the for and dowhile repetition statements to execute statements in a program
repeatedly.
4. To use the break and continue program control statements to alter the flow of control.

Listing 3-1

Listing 3-2

Listing 3-3

Listing 3-4

Listing 3-5

Exercise 1

Exercise 3

Exercise 4

DISCUSSION

In this increment and decrement operators, we can say that there will be two or more operation
that will be use to calculate the number that have been put in the input. The result will appear at
the output base in operation that we make. Then,we also make a programming using while and
do, while repetition statement that can calculate our average in number that have been put in the
input. But,we must put the counter in the programming to make sure there will not be any error.
The counter should be start at zero value until the counter value that we set. The output will
appear with the mean value based on value that we put in the input. After that, we also use for
repetition statement that can calculate two value at the same time. We can set the value to be in
the range that we want and make a statements that will only conclude number that are we
mention in the statements. By using this for repetition statement, the sum of number and the sum
of square that we want can be calculate by using this statement. We also can manually calculate
the value by making a table and compare it with the output of the programming.

CONCLUSION

In conclusion, we can conclude that, this lab experiment can be use in calculating the mean of
some number of pupils in the classroom or in the school. This programming will make our
calculation become easier and get the final values rightly. With this programming system, it will
make our life become better and less to do mistake in calculating values. So, programming is
important for us in this era because it can help us a lot in doing works and shorten the time we
use to calculate something.

You might also like