Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Q1 .

Pseudo code

1. Start
2. Read N1
3. If(N1 % 2==0)
4. Print “EVEN”
5. Else print “ODD”
6. End

Flow chart

Q2.

Pseudo code

1. Start
2. Declare N1 , N2 , N3 , N4 , N5 , N6 , N7 , N8 , N9 ,N10 , average
3. Read N1 , N2 , N3 , N4 , N5 , N6 , N7 , N8 , N9 ,N10
4. Average = (N1 + N2 + N3 + N4 + N5 + N6 + N7 + N8 + N9 + N10)/10
5. Print Average
6. End

Q3

Pseudo code

1. Start
2. Declare NUM
3. Read NUM
4. If ( 0 < NUM <10)
5. Print “red light”
6. If ( 10 <NUM < 50)
7. Print “blue light “
8. If( 50 <NUM<100)
9. Print “green light “
10. End
Q4 Pseudo code

Pseudo code

1. Start
2. Declare N1 , N2 , N3 , N4 ……
3. Put list In ascending order
4. Print N2
5. End

Q5

Pseudo code

1. Start
2. Prompt “ enter price of item “
3. Read price
4. Prompt “ enter sales tax “
5. Read tax
6. Total = price = tax
7. Display “price + tax “
8. Display total
9. end

Q8

Pseudo code

1. start
2. read m1 , m2 , m3
3. average = (m1 + m2 + m3 )/3
4. if(average >= 80 )
5. print “A”
6. else if (60 <=average <80)
7. print “B”
8. else if ( 40 <=average <60 )
9. print C
10. else if (30 <= average < 40)
11. Print “D”
12. else if (average <30 )
13. print “F”
14. end
Q9

Pseudo code

1. start
2.

You might also like