0

Java programing Lab 6

please help me with this lab . I have to write the code for the sample below. Lab Six Christine Kikuchi CSC 130, Sec # This program will use a while loop to accept integers from a user until the user enters a -1 The program will count the number of values entered, calculate the sum & average of the numbers, show how many of the numbers are even, and display the number in binary form Please enter a whole number. Enter a -1 (negative 1) to stop: 1 Please enter a whole number. Enter a -1 (negative 1) to stop: 2 Please enter a whole number. Enter a -1 (negative 1) to stop: 3 Please enter a whole number. Enter a -1 (negative 1) to stop: 4 Please enter a whole number. Enter a -1 (negative 1) to stop: 5 Please enter a whole number. Enter a -1 (negative 1) to stop: 6 Please enter a whole number. Enter a -1 (negative 1) to stop: 7 Please enter a whole number. Enter a -1 (negative 1) to stop: -1 You entered 7 numbers The sum of all of the numbers entered is 28 The average of all of the numbers entered is 4.00 Of these numbers, 3 of them is/are even. The sum in binary is 11100 https://uncg.instructure.com/courses/95088/files/9405826/download

20th Oct 2021, 3:00 PM
Abhishek Kutwal
Abhishek Kutwal - avatar
3 Respostas
0
link requires login
20th Oct 2021, 3:17 PM
zemiak
0
Learn to post proper links or paste proper code in here
20th Oct 2021, 3:47 PM
Dennis Torhov
Dennis Torhov - avatar