联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2020-10-10 11:03

ICS3U Final Culminating Assessment

Total Marks: 50

Question 1 Knowledge and Understanding [10 Marks]

1.Write a Java program that is both readable and user friendly that uses a for loop to find the sum of the following terms:

 

When finished, print out the sum of the 100 terms to 4 decimal places along with a suitable message.

Question 2 Knowledge and Understanding [10 Marks]

2.Write a readable and user-friendly Java program that uses a while loop to calculate the sum of positive integers, sum of negative integers and how many numbers were entered on the keyboard.  The input ends when the integer 0 is entered.  There is no limit to how many numbers are entered. When finished print out a message that shows

?the sum of all positive integers

?the sum of all negative integers

?how many numbers were entered?

Question 3Application [20 Marks]

Write a program with an array of size 100 that is initialized with random integers from 0 to 1000.  The program will then calculate and display the following values from the array.:

A.The sum of all the values in the array.

B.The average values of the array

C.The highest or largest value in the array

D.The lowest or smallest value in the array


Question 4 Communication and Thinking [10 Marks]

Write a program for initial amount of $2500 invested at 8.2% per annum compounded annually for 25 years. The program will output for each year, the starting amount at the beginning for the year, interest eared on that year, year end balance in a table format. Format you numbers to two decimal places.


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp