You are on page 1of 9

Dela Peña, Aries S.

| 202011197 | BSCS 1-1 | September 19, 2020 | Written work #1

Algorithm

1.START

2.Enter a number , call it num

3.Check if num %2 == 0

Divisible by 2 Go step 4

Else Go step 5

4.Display “EVEN”

5.Display “ODD”

5.END

DCIT22 COMPUTER PROGRAMMING Page 1


Dela Peña, Aries S. | 202011197 | BSCS 1-1 | September 19, 2020 | Written work #1

Flowchart

START

num

No
Num %2== 0 Display

ODD

Yes

Display

EVEN

END

DCIT22 COMPUTER PROGRAMMING Page 2


Dela Peña, Aries S. | 202011197 | BSCS 1-1 | September 19, 2020 | Written work #1

Algorithm

1.START

2.Enter a year, call it yr

3. Check if yr is accurately equal to 1 then go to step 7

4. Check if yr is accurately equal to 2 then go to step 8

5. Check if yr is accurately equal to 3 then go to step 9

6. Check if yr is accurately equal to 4 then go to step 10

7.Display “FRESHMEN”

8. Display “SOPHOMORE”

9. Display “JUNIOR”

10. Display “SENIOR”

11. END

DCIT22 COMPUTER PROGRAMMING Page 3


Dela Peña, Aries S. | 202011197 | BSCS 1-1 | September 19, 2020 | Written work #1

Flowchart

START

yr

YES
Display
yr==1?
FRESHMEN

No

Yes
Display
yr==2?
SOPHOMORE

No

Yes
Display
yr==3?
JUNIOR

No
Yes
Display
yr==4?
SENIOR

END

DCIT22 COMPUTER PROGRAMMING Page 4


Dela Peña, Aries S. | 202011197 | BSCS 1-1 | September 19, 2020 | Written work #1

Algorithm

1.START

2.Enter 3 number , call it sign, num1, num2

3.Check if sign is equivalent to 1 go to step 7

4.Check if sign is equivalent to 2 go to step 8

5.Check if sign is equivalent to 3 go to step 9

6.Check if sign is equivalent to 4 go to step 10

7.A = num1 + num2 stores to A

8.S = num1 – num2 stores to S

9.M = num1 * num2 stores to M

10.D = num1 / num2 stores to D

11.Display A

12.Display S

13.Display M

14.Display D

15.END

DCIT22 COMPUTER PROGRAMMING Page 5


Dela Peña, Aries S. | 202011197 | BSCS 1-1 | September 19, 2020 | Written work #1

Flowchart

START

Sign,num1,num2

A=num1 + num2 Display


sign==1
A

sign==2
S=num1 – num2 Display

sign==3
M=num1 * num2 Display

sign==4 D=num1 / num2 Display

END

DCIT22 COMPUTER PROGRAMMING Page 6


Dela Peña, Aries S. | 202011197 | BSCS 1-1 | September 19, 2020 | Written work #1

Algorithm

1. START

2. Enter three numbers , call them a,b,c

3. If a is greater than b same as a is greater than c then go to step 6

4. If b is greater than c then go to step 7

5. If c is greater than b then go to step 8

6. Display a is a highest number

7. Display b is a highest number

8. Display c is a highest number

9. Connects to the connector A

10. If a is less than b as same as a is less than c go to step 13

11. If b is less than c then go to step 14

12. If c less than b then go to step 15

13. Display a is a lowest number

14. Display b is a lowest number

15. Display c is a lowest number

16. Connects to the connector B

17. END

DCIT22 COMPUTER PROGRAMMING Page 7


Dela Peña, Aries S. | 202011197 | BSCS 1-1 | September 19, 2020 | Written work #1

Flowchart

START

a,b,c

If a>b
YES Display
&&
a is a highest
a>c? number

NO

YES Display

If b>c? b is a highest
number

NO

Display
YES
If c>b? c is a highest
number

NO

A
B END

DCIT22 COMPUTER PROGRAMMING Page 8


Dela Peña, Aries S. | 202011197 | BSCS 1-1 | September 19, 2020 | Written work #1

YES
If a<b
Display
&&
a is a lowest
a<c? number

NO

YES
Display
If b<c?
b is a lowest
number

NO

YES
Display
If c<b?
c is a lowest
number

NO

DCIT22 COMPUTER PROGRAMMING Page 9

You might also like