In this video, a program is created to use correct numeric data types and to find average of numeric data types in Eclipse IDE, as the requirements of this program are described below:
(Turn on caption for detail)
Program Name: Averages
In this task, you are being asked to write a program that calculates the average of numbers.
1. Create a program called Averages.java having the main() part.
2. Create five integer variables called number1 to number5. Assign proper values to these five variables.
3. Create a variable called sumIntegers and assign the sum of all five variables to sumIntegers.
4. Create a variable called averageIntegers, and assign the average of all five variables to averageIntegers.
5. Use the formula: average = sum of all numbers / count of numbers.
6. Print all five numbers, their sum, and their average by giving appropriate messages.
7. Repeat the same exercise for five double variables (number6 to number10).
8. Create variables to store their sum and calculate their average.
9. Print all five numbers, their sum, and their average by giving appropriate messages.
.
.
If you need any help in java programs then contact me through the email given below:
crazy.programming.life@gmail.com
.
Don't forget to subscribe to "Crazy Programming" and do like and comment the video.
.
.
Thanks for watching.
On this page of the site you can watch the video online Average Calculator in JAVA || Using Correct Numeric Data Types in JAVA with a duration of hours minute second in good quality, which was uploaded by the user Crazy Programming 03 May 2022, share the link with friends and acquaintances, this video has already been watched 51 times on youtube and it was liked by 7 viewers. Enjoy your viewing!