Computer Applications
As a homework assignment, your teacher has given a flowchart (shown below) to find and display the square and cube of a positive number. The execution must be terminated, if a negative number is entered.

The above flowchart has some errors which are indicated with (1), (2), (3) and (4). Answer the following questions to give the correct result.
(a) What will be the correct representation of the box in (1)?
(b) What will be the correct logic for the variable N in (2)?
(c) Out of the flow lines (3) and (4), which one is undesirable?
(d) When all the corrections are made, what will be the output, if the input value is taken as 12?
Algo & Flowcharts
27 Likes
Answer
(a) The correct representation of the box in (1) is a parallelogram or input/output box.
(b) The logic for the variable N in (2) will be - If N>0?
(c) Flow line (4) is undesirable.
(d) The output will be 144, 1728.
The corrected flowchart is shown below:

Answered By
14 Likes
Related Questions
A flowchart to check whether a triangle is possible or not.
A flowchart to display the greater of the two numbers.
Anuj, a class 9 student, has designed the following flowchart to input a positive number and check and display whether the number is a single digit number, a double digit number or a triple digit number. To assess his brother who is in class 8, he hides four statements in the flowchart.
Based on the above case and the given flowchart, answer the following questions:
(a) Which of the following statements will be filled in place of (A)?
- Display Single digit number
- Display Double digit number
- Display Negative number
- Display odd number
(b) Identify (B) from the following:
- N >= 100
- N <= 100
- N < 100
- N > 100
(c) Which of the following statements will be filled in place of (C)?
- Display Single digit number
- Display Double digit number
- Display Negative number
- Display odd number
(d) Identify (D) from the following:
- Start
- End
- Finish
- Stop
Write algorithms for the following:
To go for a class picnic