0% found this document useful (0 votes)
25 views

Assignment 1:: Problem 1

The document outlines 4 programming problems: 1) Take 5 integers from the user and display the positive and negative numbers, 2) Take 10 integers and display the even and odd numbers, 3) Take a temperature input and output if it is very hot, cool, or normal based on thresholds, 4) Take a character input and output just the vowel characters present.

Uploaded by

Sohaib Qaisar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Assignment 1:: Problem 1

The document outlines 4 programming problems: 1) Take 5 integers from the user and display the positive and negative numbers, 2) Take 10 integers and display the even and odd numbers, 3) Take a temperature input and output if it is very hot, cool, or normal based on thresholds, 4) Take a character input and output just the vowel characters present.

Uploaded by

Sohaib Qaisar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 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.

You might also like