Sie sind auf Seite 1von 2

Page 1

Faculty of Manufacturing Engineering


“In the name of Allah, The Most Beneficent, The Most Merciful”

BFF2003: COMPUTER PROGRAMMING

ASSIGNMENT #13 : REPETITIVE

Prepared By:
Ts. Dr. Nafrizuan Mat Yahya
nafrizuanmy@ump.edu.my
h/p: 0186652051 office: 09-424 5930

Due Date: (Tuesday) 11 December 2018 (before 5pm).

Assignment Objectives:
 Construct and analyze C programs involving for loop.

There are six (6) questions. Please answer all questions.


For every each of questions, you need to start your program with your Goups
Members/IDs/Section in the comments’ form and general comment about your
programs.

Date: ____________________

Student
Group Members Section
ID

/40
// In the name of *ALLAH/ GOD, we declare that this is our original work.

BFF2003 Computer Programming Assignment13 118/19


Page 2

For question 1 to 4, you does not need to write the whole program, but just a main function
only.

1. Write a for loop that will produce the following sequences:


o 6, 8, 10, 12,…66
4
2. Write a for loop that will produce the following sequences:
o 7, 9, 11, 13,…67
4
3. Write a for loop that will produce the following sequences:
o the sum of the numbers between 1 and 15 inclusive
4
4. Write a for loop that will produce the following sequences:
o the sum of the odd numbers between 15 and 45 inclusive
4
5. Write a for loop that will produce the following sequences:
o the first 50 number in the series 1, 4, 7, 10,….
o Calculate the total 1+4+7+10+….
4

6. Write a program in a function manner to print calendar of OCTOBER 2009 using for loop.

20

BFF2003 Computer Programming Assignment13 118/19

Das könnte Ihnen auch gefallen