Sie sind auf Seite 1von 10

Flowgorithm Session1

Tutorial on how to print hello world.


Exercise Questions
1.1 Input your name and print hello message with your name.

1.2 Input two number and print the sum and difference.

1.3 Input two numbers and print the product and difference of these numbers.

1.4 Input two numbers and print the largest numbers.

1.5 Create a flowchart that reads an input from the user and checks if it’s a character, number
or others. Give appropriate output message.

1.6 Input radius of the circle and print the area.

1.7 Input length and breadth of the rectangle and print the area.

1.8 Print the smallest among three numbers.

1.9 Design a flow chart to find all the roots of a quadratic equation ax2+bx+c=0.

1.10 Design a flowchart that gives user a choice to find either square or cube of a number.

1.11 Draw a flowchart and write its program to determine if a given number is even or odd.

1.12 Design flow chart for the following scenario:-


Input the marks of five subjects of a student and calculate the average and based on
the conditions given below set the grade of the students.
Mark Range Grade
90-100 A+
80-90 A
70-80 B
60-70 C
45-60 D
<45 F

1.13 Design flow chart for the following scenario:-


Input the designation (Manager, Supervisor, Worker) and salary of the employee and
calculate the bonus the employee will receive with the following conditions.
Designation Salary Range Bonus
Manager Above 80000 15% of Salary
Manager 60000 – 80000 12% of Salary
Supervisor 50000 – 65000 10% of Salary
Supervisor 40000-50000 7% of Salary
Worker Above 30000 5% of Salary
Worker Below 30000 3% of Salary
1.14 Design a flow chart for the following scenario:-
Joe is a farmer and a pet lover. He has a lot of his favourite pets – cats and dogs in the
barn He does not know their exact count. But he knows that there are C cats and D
dogs in the barn. Also, one day went to field and found that there were L legs of the
animals touching the ground. Joe knows that cats love to ride on the dogs. So, they
might ride on the dogs, and their legs won't touch the ground and Joe would miss
counting their legs. Joe's dogs are strong enough to ride at max two cats on their back.

It was a cold foggy morning, when Joe did this counting. So he is now wondering
whether he counted the legs properly or not. Specifically, he is wondering is there
some possibility of his counting being correct. Please help Joe in finding it.

Input: 3 integers C, D, L denoting number of cats, dogs and legs counted by Joe
respectively.
Output: Yes or No indicating the counts matches or not.

Das könnte Ihnen auch gefallen