Exam 1- 2010

Exam 1 2010

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: value exactly once. o If all 3 values are different, print No mode. CS 115 Exam 1, Spring 2010 Page 5 of 7 (c) Your task: o Prompt the user to type their name. o If they type “none”, do not greet them by name and do not print anything else. o If they type anything else, greet them by name and repeat these steps. o Do not use a return statement in this snippet of code! (d) Assume: o The float variable s has already been declared and defined. Your task: o Compute and print the area of a square whose side length is s (remember that area is the square of the side length). o Format your answer EXACTLY this way: The area of a square with side length _____ is ______. CS 115 Exam 1, Spring 2010 Page 6 of...
View Full Document

This note was uploaded on 02/08/2014 for the course CS 115 taught by Professor Staff during the Fall '08 term at Sonoma.

Ask a homework question - tutors are online