0% found this document useful (0 votes)
4 views2 pages

Assignment in Prog

The document explains pseudocode as a simplified method for outlining algorithms without strict programming syntax. It includes a flowchart example for finding the largest of three numbers and provides a pseudocode solution for calculating the factorial of a non-negative integer. Additionally, it highlights the importance of flowchart symbols and their functions.

Uploaded by

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

Assignment in Prog

The document explains pseudocode as a simplified method for outlining algorithms without strict programming syntax. It includes a flowchart example for finding the largest of three numbers and provides a pseudocode solution for calculating the factorial of a non-negative integer. Additionally, it highlights the importance of flowchart symbols and their functions.

Uploaded by

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

Jhon Racil Q Eran

BSEE-1A

1. Read about Pseudocode and a Flowchart

Pseudocode is a simplified, informal way of describing an algorithm or a computer program's


logic without adhering to the strict syntax of any specific programming language. It uses natural
language combined with programming-like structures (e.g., if-then-else , loops ) to represent
the steps involved.

2. Identify all symbols used in flowcharting and their purpose.

BEGIN
INPUT num1, num2, num3 // Get three numbers as input

IF num1 > num2 THEN


largest = num1
ELSE
largest = num2
ENDIF

IF largest < num3 THEN


largest = num3
ENDIF

OUTPUT largest // Output the largest number


END

3. Give at least 2 programming problems with solution written in pseudocode.

BEGIN
INPUT n // Get a non-negative integer as input

IF n < 0 THEN
OUTPUT "Factorial is not defined for negative numbers"
ELSE IF n == 0 THEN
OUTPUT 1 // Factorial of 0 is 1
ELSE
factorial = 1
FOR i = 1 TO n DO
factorial = factorial * i
ENDFOR
OUTPUT factorial
ENDIF
END

You might also like