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
harina [27]
3 years ago
12

Part1) Given 3 integers, output their average and their product, using integer arithmetic.

Computers and Technology
1 answer:
Mrac [35]3 years ago
6 0

Answer:

The program is as follows:

#include <iostream>

#include <iomanip>

using namespace std;

int main(){

   int num1, num2, num3;

   cin>>num1>>num2>>num3;

   cout << fixed << setprecision(2);

   cout<<(num1 + num2 + num3)/3<<" ";

   cout<<num1 * num2 * num3<<" ";

   return 0;

}

Explanation:

This declares three integer variables

   int num1, num2, num3;

This gets input for the three integers

   cin>>num1>>num2>>num3;

This is used to set the precision to 2

   cout << fixed << setprecision(2);

This prints the average

   cout<<(num1 + num2 + num3)/3<<" ";

This prints the product

   cout<<num1 * num2 * num3<<" ";

You might be interested in
This is used in a program to mark the beginning or ending of a statement, or separate items in a list:_____
hammer [34]

Answer:

B) Punctuation

Explanation:

Punctuation are greatly used in different programming languages for different purposes. In the Java, C++ and C# Programming languages for example, two popular punctuation marks are the comma (,) and semi-colon (;). The comma is used for separating elements of a list and arrays, while the semi-colon indicates end of an executable statement or line of code. Other popular punctuation marks used in programming are periods (dot), question marks, parenthesis angle brackets and braces each implementing a specific grammatical syntax in the language.

5 0
2 years ago
Maia notices that her paragraphs are too close to one another. She wants to increase the space. Which arrangement of steps does
kirza4 [7]

Maia can quickly and easily adjust the spacing that exists before and after her paragraphs. To achieve this, she should select her paragraphs and click the Line and Spacing command in the Paragraph command group. She should be able to click the Add Space Before Paragraph from the drop-down menu. The paragraph spacing should change. In the same drop-down menu, she can also select the Line Spacing Option. This will open the Paragraph dialog box. This option will let her control how much space She wants before and after the paragraph. These two options are placed and indicated down below the Paragraph dialog box.

7 0
3 years ago
Read 2 more answers
How can anger cause workplace accidents?
Umnica [9.8K]
I think the corect answer is c
8 0
3 years ago
Read 2 more answers
The theory of continental drift is supported by all of the following EXCEPT
Stels [109]
Climate seems like the correct answer
8 0
2 years ago
Use input() function to take 4 user inputs as variables and choose at least 2 ways to print out the following statements. You ca
taurus [48]

Answer:

statements = tuple(input("Enter four statements separated by comma: ").split(","))

st1, st2, st3, st4 = statements

#print with:

print(f"{st1}, {st2}, {st3}, {st4}")

# or:

print("{}, {}, {}, {}".format(st1, st2, st3, st4))

Explanation:

The input function in python is used to prompt for user input. It returns a string. The code above splits the string of the input function and converts it to a tuple, which is unpacked in four variables st1, st2, st3, and st4.

The variables can be printed out as strings directly or by using the "f" keyword or the format function.

6 0
2 years ago
Other questions:
  • Web definition what means web
    9·1 answer
  • Read the following code carefully and do as directed: int main() { // Initialising starting number int num = 1; int n=7 // Outer
    5·1 answer
  • Match the spreadsheet features with their respective descriptions.
    7·2 answers
  • Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an even parity scheme is being used. What
    15·1 answer
  • Insert a function in cell g5 to calculate the first student's monthly payment, using appropriate relative and absolute cell refe
    13·1 answer
  • Java: Literal representing the true value ? In java, what is the literal that represents a true value ?
    6·1 answer
  • Write a Java program to count the characters in each word in a given sentence?Examples:Input : geeks for geeksOutput :geeks-&gt;
    10·1 answer
  • For each of the following application areas state whether or not the tree data structure appears to be a good fit for use as a s
    8·1 answer
  • Write a technical term for following statements
    15·1 answer
  • It is a data being transported on a network​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!