Q1sp01 - temperature is more than 80, output It is cold if...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
EGN 3210 Quiz 1 Spring 2001 NAME_____________________________ SS#_____________________________ 1. Determine the output x = 132; y = 7; z = 3; if ( (x <= 150 && x > 0 && y >10) || z > 3 || y == 7 ) print("Yes"); else p r i n t ( " N o " ) ; A n s : 2. Write a small program to input the temperature from the keyboard and output “It is hot” if the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: temperature is more than 80, output It is cold if the temperature is less than 70 and It is nice if the temperature is between 70 and 80. Use the scanf ( ) and printf ( ) functions and assume the temperature is an integer....
View Full Document

Ask a homework question - tutors are online