Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

import java.util.Scanner; public class LabProgram { public static void main ( String [ ] args ) { Scanner scnr = new Scanner ( System .

import java.util.Scanner;
public class LabProgram {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
int num1;
int num2;
int num3;
int num4;
num1= scnr.nextInt();
num2= scnr.nextInt();
num3= scnr.nextInt();
num4= scnr.nextInt();
System.out.println((num1* num2* num3* num4)+""+(num1+ num2+ num3+ num4)/4+"");
double n1= num1;
double n2= num2;
double n3= num3;
double n4= num4;
System.out.printf("%.3f %.3f",(n1* n2* n3* n4),(n1+ n2+ n3+ n4)/4);
}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions