(CALCULATE AVERAGE OF 2 NUMBERS) You will be given two double variables, numberLabs and numberStudents, which will be in

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

(CALCULATE AVERAGE OF 2 NUMBERS) You will be given two double variables, numberLabs and numberStudents, which will be in

Post by answerhappygod »

Calculate Average Of 2 Numbers You Will Be Given Two Double Variables Numberlabs And Numberstudents Which Will Be In 1
Calculate Average Of 2 Numbers You Will Be Given Two Double Variables Numberlabs And Numberstudents Which Will Be In 1 (215.09 KiB) Viewed 20 times
JAVA
(CALCULATE AVERAGE OF 2 NUMBERS) You will be given two double variables, numberLabs and numberStudents, which will be initialized for you. . Your job is to calculate the average of these numbers and store it in a variable named averageLabSize. Output has been take care of for you!

SAMPLE INPUT/OUTPUT: Input Output 2 Average lab size is 25.0 50 4 Average lab size is 12.5 50 8 Average lab size is 10.875 87

1 Exit Full Screen POD.java + New 6 * @version 1.0 7 * @since 2020-05-01 8 9 10 - import java.util.Scanner; 11 12 - public class POD { 13 14 public static void main(String[] args) { 15 16 //Create a Scanner object to read input from the keyboard 17 Scanner in new Scanner(System.in); 18 19 //Declare two double variables and initialize (based on input) 20 double numberLabs = in.nextDouble(); 21 double numberStudents = in.nextDouble(); 22 23- 24 || Start your work here || 25 ============ 26 27 28 29 //Declare a double variable and initialize 30 31 32 33 34 35 || End your work here IL 36 */ 37 38 //output 39 System.out.println("Average lab size is " + averageLabSize); 40 } 41 }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply