0% found this document useful (0 votes)
70 views8 pages

DEC2012 - Fundamental Progamming Practical Work Assessment: Electrical Engineering Department

The document contains information about a programming practical assessment session held in December 2017. It includes: 1. A breakdown of marks for the practical skill assessment which includes documentation, flowchart, program, and output. This section is worth 40 total marks. 2. A breakdown of marks for the report assessment which includes a conclusion section. This section is worth 10 total marks. 3. The total marks possible for the assessment is 50. The practical assignments include programs to illustrate a for loop, printing numbers in reverse order using a decrement operator, and generating Fibonacci series terms using a for loop. Flowcharts are also included for assignments 1 and 2.

Uploaded by

Muhammad Faiz
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 (0 votes)
70 views8 pages

DEC2012 - Fundamental Progamming Practical Work Assessment: Electrical Engineering Department

The document contains information about a programming practical assessment session held in December 2017. It includes: 1. A breakdown of marks for the practical skill assessment which includes documentation, flowchart, program, and output. This section is worth 40 total marks. 2. A breakdown of marks for the report assessment which includes a conclusion section. This section is worth 10 total marks. 3. The total marks possible for the assessment is 50. The practical assignments include programs to illustrate a for loop, printing numbers in reverse order using a decrement operator, and generating Fibonacci series terms using a for loop. Flowcharts are also included for assignments 1 and 2.

Uploaded by

Muhammad Faiz
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/ 8

Electrical engineering department

DEC2012 – FUNDAMENTAL PROGAMMING


PRACTICAL WORK ASSESSMENT
SESSION:DEC 2017

TITLE For Statement


PRACTICAL NUMBER 5

Item \ Student

1. Documentation/ Theory /8

Practical Skill 2. Flowchart /12


Assessment
[CLO3] 3. Program /12

5. Record the result//output /8


Total Practical Skill Assessment /40

Report 1. Conclusion /10


Assessment
Total Report Assessment /10

TOTAL
STUDENT’S NAME REG. NUMBER
MARKS/50

S1

LECTURER’S NAME DATE


NAMA : ___________________________________ NO.PEND: _____________ KELAS:_________
Practical 5 : Looping Statements
Practical Objectives:
 To explore the concept of looping in a programming language, in general, and to study
some looping constructs available in C. 

Define Looping statement.

List types of Looping Statement.

Define FOR loop statements.


Write the syntax for nested FOR Statement

Describe BREAK Statement

Describe CONTINUE Statement

Describe GOTO Statement


Practical Assignments 01: ( save file lab5a_no.pend)
This program will illustrate the working of a for loop.
/* nama: no.pend: tajuk: */
#include <stdio.h>
int main(){
int n, count, sum=0;
printf("Enter the value of n.\n");
scanf("%d",&n);
for(count=1;count<=n;++count) //for loop terminates if count>n
{
sum+=count; /* this statement is equivalent to sum=sum+count */
}
printf("Sum=%d",sum);
return 0;
}
Output

Flowchat 1 :Practical Assignments 01


Practical Assignments 02: ( save file lab5b_no.pend)
Program to illustrate the use of the decrement operator to print the numbers from 1 to 5 in the
reverse order.
/* nama: no.pend: tajuk: */
#include <stdio.h>

main()
{
int array[100], n, c;
printf("Enter the number of elements in array\n");
scanf("%d", &n);
printf("Enter %d elements\n",
n); for ( c = 0 ; c < n ; c++ )
scanf("%d", &array[c]);
printf("Array elements entered by you are:\n");

for ( c = 0 ; c < n ; c++ )


printf("array[%d] = %d\n", c, array[c]);
return 0;
}
Output

Flowchat 1 :Practical Assignments 02


Practical Assignments 03: ( save file lab5c_no.pend)
Program to illustrate the use of the decrement operator to print the numbers from 1 to 5 in the
reverse order.
/* nama: no.pend: tajuk: */
#include
<stdio.h> main()
{
int n, first = 0, second = 1, next, c;
printf("Enter the number of terms\n");
scanf("%d",&n);
printf("First %d terms of Fibonacci series are :-
\n",n); for ( c = 0 ; c < n ; c++ )
{
if ( c <= 1 ) next
= c;
else
{
next = first + second;
first = second;
second = next;
}
printf("%d\n",next);
}

return 0;
}
Output
Flowchat 1 :Practical Assignments 03
conclusion

You might also like