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.
Sur cette page du site, vous pouvez voir la vidéo en ligne Average Calculator in JAVA || Using Correct Numeric Data Types in JAVA durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Crazy Programming 03 mai 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 51 fois et il a aimé 7 téléspectateurs. Bon visionnage!