0% found this document useful (0 votes)
114 views13 pages

Experiment Title: Algorithms and Flowchart A) Flowchart: Start

The document contains examples of flowcharts and pseudocode for basic algorithms and programming concepts: 1) A flowchart and pseudocode that calculates the average of 4 numbers. 2) A flowchart and pseudocode that compares two numbers and identifies the bigger and smaller numbers or outputs that they are equal. 3) A flowchart and pseudocode that determines if a number is even or odd. It also includes examples of C code for basic programming structures like functions, loops, arrays, and structures.

Uploaded by

AlwiCheIsmail
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views13 pages

Experiment Title: Algorithms and Flowchart A) Flowchart: Start

The document contains examples of flowcharts and pseudocode for basic algorithms and programming concepts: 1) A flowchart and pseudocode that calculates the average of 4 numbers. 2) A flowchart and pseudocode that compares two numbers and identifies the bigger and smaller numbers or outputs that they are equal. 3) A flowchart and pseudocode that determines if a number is even or odd. It also includes examples of C code for basic programming structures like functions, loops, arrays, and structures.

Uploaded by

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

Experiment Title: Algorithms And Flowchart

a)
Flowchart
START

Read
Num1, Num2 ,Num3,
Num4

AVE = (Num1 + Num2 + Num3 +


Num4)/4

Display
AVE

END

Pseudo code
Start
Read Num1, Num2, Num3, Num4
Compute AVE as (Num1 + Num2 + Num3 + Num4)/4
Write AVG
End

Output

b)
Flowchart

START

Read
Num1, Num2

YES
Num1 > Num2

Num1 = Num2

YES

BIG = Num1
SMALL = Num2

Write

These number are equal

NO
BIG = Num2
SMALL = Num1

Pseudo code

END

Start
Read Num1,Num2

If Num1 larger than Num2


BIG = Num1
SMALL = Num2
else
If Num1 equal to Num2
Write These number are equal
else
BIG = Num2
SMALL = Num1
End

c)
Flowchart
START

Read
INTEGER

Write
This is an even numberl

NO

INTEGER/2=0
START

Write
YES

This is an odd numberl

Pseudo code
Start
Read INTEGER
If INTEGER/2==0
write This is an Odd Number
else
write This is an Even Number
End
Experiment Title: Introduction to C Programming
1)
1
2
3
4
5
6

#include
main()
{
// Display Welcome to C to the console
Printf(welcome to C Programming);
}

2)

3)

Experiment Title: C Structures


1)

2)

3)
Flowchart
START

Read
MYR

write
USD =
MYR*3.2
USD
END

Pseudo code
Start
Read MYR
Compute USD=MYR*3.2
Write USD
End

Output

Experiment Title: C Structures


1)

Experiment Title: Looping


1)

10

Output

2)

Output

Experiment Title: Functions

11

Output

Experiment Title: Arrays

12

Output

13

You might also like