Professional Documents
Culture Documents
ProblemSheet - Decision Making - Biotech
ProblemSheet - Decision Making - Biotech
ProblemSheet - Decision Making - Biotech
2. Write a program to check whether the given integer is a multiple of both 5 and 7
3. Write a program to input sides of a triangle and check whether a triangle is equilateral, scalene
or isosceles triangle using if else.
Properties of triangle are as follows
• A triangle is said Equilateral Triangle, if all its sides are equal. If a, b, c are three sides of
triangle. Then, the triangle is equilateral only if a == b == c.
• A triangle is said Isosceles Triangle, if its two sides are equal. If a, b, c are three sides of
triangle. Then, the triangle is isosceles if either a == b or a == c or b == c.
4. Write a program that reports the contents of a compressed gas cylinder based on the first letter
of the cylinder's color. The program obtains a input character that represents the color of the
cylinder as ‘Y’ or ‘y’ for yellow, ‘O’ or ‘o’ for orange, and so on. Cylinder color’s and
associated contents are as follows:
Your program should respond to input character other than the first letter of the above colors
with the message: "Contents unknown"
5. Write a program to implement the flowchart given below based on the pH value given by the
user.
6. A company has the following discount policy for the goods purchased. If the product purchased
is under Rs.2000, no discount is given. On purchases for Rs. 2000 and above but less than
Rs.5000, a discount of 5% is given. On purchase of goods for Rs.5000 and above, a discount of
8% is given. Write a program to accept the purchase amount and print the final bill amount.
7. Write a program that prompts the user to input total number of phone calls made and calculate
the monthly telephone bill as per the following conditions:
Write a program to check whether a particular student’s mark is eligible for admission or
not.
9. Write a program to calculate the income tax payable by the user based on the total income.
The tax is calculated as per the below table.
10. Write a program to compute the area of geometrical shapes using switch case as follows.
If the user enters any other input characters print as INVALID input.