Monkey Bananas

Post on 02-Jun-2018

223 views 0 download

Transcript of Monkey Bananas

8/11/2019 Monkey Bananas

http://slidepdf.com/reader/full/monkey-bananas 1/3

8/11/2019 Monkey Bananas

http://slidepdf.com/reader/full/monkey-bananas 2/3

Dr. Tolga Soyata. © U of R, Electrical and Computer Engineering, tolga.soyata@rochester.edu

Program 1 (5 points): listnum.c

Write a program that displays numbers from -10 to +9 , their squares, and square roots in a nicelyformatted fashion. If the number is negative, it should write Complex in the square root column. You

have to use a for() loop, while() loop, or a do{} loop. Any one of these is acceptable.Program 1 grading tips : Nice formatting is 1 point, functionality is 3 points , careful “casting” andtechnical quality as well as careful bracketing the statements is 1 point. Using a bunch of printf()statements to create this output will get you zero points !!! You have to do it with a loop !!!

Program 1 Expected Output:

8/11/2019 Monkey Bananas

http://slidepdf.com/reader/full/monkey-bananas 3/3