a. Count of all negative numbers. If no negative numbers are entered, 0 for the count value should be displayed.
b. Sum of all positive numbers. If no positive numbers are entered, 0 for the sum value should be displayed.
c. Average of first two negative numbers. If two negative numbers are not entered, 0 for the average value should be displayed.
d. Largest number of all numbers entered from the keyboard.
e. Reverse order of first two numbers. The reverse order of two numbers 3.2 6.5 is 6.5 3.2.
f. Area (area = pi*r2) using the smallest positive number as a radius (r) and pi=3.14.
N should be declared as a constant in your program and it should be equal to the largest digit of your student id number. Assume N=2, if the largest digit of your student id number is less than 2.
The program should contain only a main function. User defined functions and arrays should not be used
in this assignment. If you use arrays or functions, you will be penalised 25% of the total marks for the
assignment. You should also not use things which are not part of this course. You will be penalised 25% of the total marks for the assignment, if you use things (eg. classes, linked list, etc.) which are not covered in this course.
Recently Asked Questions
- What impact would the following changes have on the Security Market line? How would these changes impact the required return for a given level of risk?
- Please refer to the attachment to answer this question. This question was created from Home Heaters_Students. Additional comments: "i need to recorde it in
- A Java example of the Liskov substitution principle is ___. a.) overloading b.)abstract classes c.) typeless variables d.) parameterized ArrayLists