Question: The main objective of this Lab Assignment is to get hands on experience of the Scanner class and Java Operators. Below are few exercise programs

The main objective of this Lab Assignment is to
The main objective of this Lab Assignment is to get hands on experience of the Scanner class and Java Operators. Below are few exercise programs related to the topics we have already covered in class lectures. Please submit the exercise question statement along with your answers while submitting your assignment. Please comment your code properly. Please submit a screenshot of the output of your program, demonstrating that it is working. without any errors. Exercise 1: Write a Java program to get 5 numbers from keyboard (user). The user must be able to enter fractional numbers. Find the sum and average of the five numbers. The program must display the sum and average at the output. Exercise 2: Write a Java program that accepts two integers from the user using Scanner class and prints "The numbers are equal" if two numbers are equal, and "The numbers are not equal otherwise. Exercise 3: Write a Java program that gets an integer value from user and calculates four times of that number using shift operation. If the user enters 5 , then program must print number (5) and its four times (20) at the out put using the shift operation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!