1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Jobisdone [24]
1 year ago
6

A program is required to three (3) numbers. calculate and print their total

Computers and Technology
1 answer:
podryga [215]1 year ago
5 0

A program that is required to three (3) numbers. calculate and print their total is given below:

<h3>The Program</h3>

import java.util.Scanner;

public class SumAndAverage {

public static void main(String[ ] args) {

System.out.println("Enter three numbers - ");

// Accepting and finding sum of numbers.

int sum = 0;

Scanner sc = new Scanner(System.in);

for (int i = 0; i < 3; i++)

sum += sc.nextInt( );

// Printing sum and average.

System.out.println("Sum - " + sum);

System.out.println("Average - " + (sum / 3f));

}

}

The output would request three different numbers, then add them up, and display the output of the sum and then display or print their total


Read more about programming here:

brainly.com/question/23275071

#SPJ1

You might be interested in
Define print_shape() to print the below shape. Example output:
ella [17]

The print_shape() is an illustration of Python function; whose execution is carried out when the function is called

<h3>The print_shape() function</h3>

The print_shape() function written in Python, where comments are used to explain each action is as follows:

#This defines the function

def print_shape():

   #The following iteration is repeated three times

   for i in range(3):

       #This prints the *** in each iteration

       print('***')

#This calls the function

print_shape()

Read more about Python functions at:

brainly.com/question/15745784

5 0
2 years ago
Lisa and her husband would like to buy a house soon. She continuously pays bills late. How do her actions affect her and others?
stiks02 [169]
Well actually it affects her credit. Home owners would not want to sell a house to someone who doesn't pay bills on time. It shows he/she is unreliable

3 0
3 years ago
Read 2 more answers
I have a lot of stuff on my pc and I want to make my pc brand new from when I bought it, How do I clean my pc to make it where i
stepan [7]
Well if your talking about physically you could get some compressed air and blow it out. Or if your talking about performance you could try to re-install the os you have on it or replace the hdd with a ssd or higher performance hard disk for it to run like new. :)
5 0
4 years ago
Read 2 more answers
In a folder hierarchy, the top level is referred to as which of the following?
Vesnalui [34]

Answer:

B. root

Explanation:

Every user in Linux is assigned a folder from which they can store their files. The interpreter allows you to abbreviate your route with the “~” symbol. The ls command without any additional data shows the files in the current directory, but if after the name of the command a path is written, it shows the files in that path. Therefore, the ls ~ command shows the files in the user's folder.

In addition to the folders and files created by the user or programs, every Linux folder has two subfolders defined by default:

“..”: It is the top level folder in the file hierarchy that contains it. This subfolder is also present in the root of the filesystem (the folder with absolute path “/”), but points to itself.

“.”: It is the folder itself that appears as if it were also a subfolder. It can be considered as a "self-reference" or pointer to itself.

These folders are normal folders in the system for all purposes; that is, they can be used on routes. For example, the path /dirA/dirB/dirC/../fichero2.txt refers to the file that is stored in the dirB folder, since from dirC, the folder .. points to its predecessor, dirB. The following figure shows the interpretation of this route as well as the equivalent of the “..” and “.” Folders.

4 0
3 years ago
Mellissa wants to pursue a career in database administration. Select the requirements needed to achieve this.
adelina 88 [10]
I think its the answer is 4 
8 0
3 years ago
Read 2 more answers
Other questions:
  • Match the element of a presentation program to its description
    11·1 answer
  • In which setting would you be least likely to find a full-time A/V technician?
    5·2 answers
  • Jeffrey works with a huge database of spreadsheet records each day. To organize and identify these spreadsheets, he wants to ass
    8·1 answer
  • State three differences between a hard drive and a pen drive​
    6·1 answer
  • After reviewing the various types of network connections available, a client chooses a network connection that is considered to
    13·1 answer
  • Given the string variable address, write an expression that returns the position of the first occurrence of the string avenue in
    6·1 answer
  • What are the controls in the Capture panel? Define each controls
    10·1 answer
  • Select the statement which most accurately describes the benefits and drawbacks of working from home and telecommuting.
    13·2 answers
  • Define the term hardwar<br><br>​
    9·2 answers
  • Using a linear search to find a value that is stored in the last element of an array of 20,000 elements, ________ element(s) mus
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!