Assignment-1

alok.pandey@csn.edu
CIT-198B C-#
Due: Tuesday by email

Notes: Each program should have a header describing the purpose of the program. These should also be well indented [not using tab] to increase readability. Try using the variable names that makes sense in the program.Make sure that the program compiles and runs. Send me only the .csc files.

Question-1: Write a program that reads three integers from the keyboard and outputs their sum and product. [#10/page-66 of Chapter-2 og Gittleman]

Question-2: Write a program to enter the height and width of a rectangel from the keyboard and output the area of the rectangle. [#12/page-66 of Chapter-2 og Gittleman]

Question-3: Write a program that reads an integer number of miles, converts it to an equivalent number of feet, and outputs the result. (There are 5280 feet in a mile) [#15/page-67 of Chapter-2 og Gittleman]

Question-4: Write a program to convert degrees Fahrenheit to degree Celcius. Input an integer Fahrenheit temperature and convert to an integer Celcius temperature using the formula Celcius = 5(Fahrenheit -32)/9. Output the result. [#16/page-67 of Chapter-2 og Gittleman]

Question-5 (Extra Credit): Write a static method with one ineteger parameter, x, that returns the value of the polynomial 4x 2 + 3x -5. Call this method twice from the Main method, each time reading in the value of x and displaying the result.