Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
4.8k views
in Computer by (49.5k points)
closed by

Write pseudocode and draw flowchart to accept numbers till the user enters 0 and then find their average.

1 Answer

+1 vote
by (51.9k points)
selected by
 
Best answer

Pseudocode is as follows: 

Step 1: SET count = 0, sum = 0 

Step 2: INPUT num 

Step 3: WHILE num is not equal to 0, REPEAT Steps 4 to 6 

Step 4: sum = sum + num 

Step 5: count = count + 1 

Step 6: INPUT num 

Step 7: COMPUTE average = sum/count 

Step 8: PRINT average 

The flowchart representation is shown in Figure.

Flowchart to accept numbers till the user enters 0

we do not know how many numbers a user is going to enter before entering 0. This is handled by checking the condition repeatedly till the condition becomes false.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...