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

Applied Science University

.Electrical & Computer Engineering Dept


Computer Skills II
First exam

:Q1) Write a program to calculate and print the result of the following sequence

4 6 02
y= 1+ + +…
3 5 21

Q2) Write a program that reads a number ranged from 0 to 4, then print odd if the
number is odd and print even if the number is even. Use switch statement only.

Q3) write a program that reads a tempreture of the day, then print the following:

If the tempratue is less than 10 then print "very cold"


If the temprature is between 11 and 19 then print "Cold"
If the temprature is between 20 and 28 then print "Nice day"
Otherwise print "Hot"

You might also like