Вы находитесь на странице: 1из 1

ASSIGNMENT 1:

PROBLEM 1:
Write a program which takes 5 integers from the user. Write an if statement which determines
that either the numbers entered are positive or negative. Display all the positive and negative
numbers.
PROBLEM 2:
Write a program which takes 10 integers from the user. Write an if condition which determines
that which numbers are even numbers and which are odd numbers. Show all the even and odd
numbers on the output screen.
PROBLEM 3:
Write a program that takes temperature as an input and makes following decisions

 If temp. is greater than 40 it says “very hot day”


 If temp. is less than 20 it says “it’s cool”
 Otherwise it says “It’s a normal day”
PROBLEM 4:
Write a program which takes char input from the user. Write an if condition that shows all the
vowels present in that character input.
Note: the output just shows the vowels (a,e,i,o,u). except vowels there shouldn’t be any other
alphabet in the output.

Вам также может понравиться