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

11.

17

Classwork:

1. Check if input number is odd or even number and output the result.
2. Input sides of rectangle a and b. Find the area of the rectangle and
output the result.
3. Write a program that asks the user to enter two numbers. Add them
together and output the result.
4. Input base and height of triangle b, h. Find the area of the triangle
and output the result.
5. Input three numbers. Calculate the average of these numbers and
output the result.

6. Check if input number is even or odd. If number is odd multiply it by


2, if number is even divide it by 3. Output the result.
7. Check if input number is dividable by 5 and 9. Output the result “yes”
or “no”.
8. Input 2 digit number and find the sum of the digits.

Homework:

1. Write a program that takes a user input and checks whether the
entered number is positive, negative, or zero. Output the result.
2. Input the radius of a circle. Calculate the area of the circle and output
the result.

3. Input 3 digit number and check if sum of the digits are odd or even.
4. Create a program that takes two numbers as input. Check if the first
number is divisible by the second number, and output the result.

You might also like