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
natita [175]
4 years ago
9

A variable like user_num can store a value like an integer. Extend the given program as indicated. Output the user's input. (2 p

ts) Output the input squared and cubed. Hint: Compute squared as user_num * user_num. (2 pts) Get a second user input into user_num2, and output the sum and product. (1 pt)
Computers and Technology
1 answer:
lapo4ka [179]4 years ago
7 0

Answer:

The answer to this question is given below in the explanation section. It is noted that this program is written in C++ using online C++ compiler.

Explanation:

#include <iostream>

using namespace std;

int squared(int num)// this is the function to compute square

   {

       return num*num;

   }

int cube(int num)// this is the function to compute cube

   {

       return num*num*num;

   }

int main()

{

   int user_num, user_num2; // variable declaration

   

       cout<<"Enter the first number: ";//prompt user to enter the number

       cin>>user_num;//store the user entered number into variable

       cout<<"\nEnter the second number: ";//prompt the user to enter the second number

       cin>>user_num2;//store the user entered number into variable

   

   

   cout<<"\nSquared of first number is: "<<squared(user_num);//compute square of user_num and display

   cout<<"\nCube of first number is: "<<cube(user_num);//compute the cube of the user_num and display

   cout<<"\nSquare of second number is: "<<squared(user_num2);//compute the square of user_num2 and display

   cout<<"\nCube of second number is: "<<cube(user_num2);//compute the cube of user_num2 and display

   

   cout<<"\nSum of number 1 and number 2 is: "<<user_num2 + user_num2;//display the sum of user_num2 and user_num

   cout<<"\nProduct of number 1 and number 2 is: "<<user_num2 * user_num;//display the product of user_num and user_num2

   

   

   return 0;//terminate the program

}

                               

You might be interested in
What should you do before cleaning the top of a storage battery and rinsing it with fresh water?
Montano1993 [528]
D. Discharge the battery completely
6 0
3 years ago
We learned that an ideal multiple access protocol has FOUR desirable
Nataly [62]

Answer:

We learned that an ideal multiple access protocol has FOUR desirable

characteristics, describe them.

Explanation:

1.- Very experienced technology and easy to implement.

2.- Rigid resource management and unfit for variable traffic flows.

3.- Requires antenna duplexer for duplex transmission.

<u>Duplex</u> <em>is a term used in telecommunication to define a system that is capable of maintaining two-way communication, sending and receiving messages simultaneously. </em>

4.- Normally FDMA is combined with multiplexing FDD.

<u>FDMA</u> (acronym in English for Frequency Division Multiple Access) <em>is a multiplexing technique used in multiple communication protocols, both digital and analog, mainly radio frequency, and among them in mobile phones of GSM networks. </em>

<u>FDD</u> (Frequency Division Duplexing in English) <em>designates a duplex method in the environment of wireless telecommunications and over certain wired networks.</em>

4 0
4 years ago
A(n) ____ allows others besides the manufacturer to develop software to run on the system or device.
RideAnS [48]

Answer:

Application Programming Interface.

Explanation:

Application Programming Interface(API) is a collection of function, routines, procedures and the protocol which are used create a software application.The main role of API is that it defined or specified how the components of software will interact.

The objective of the Application Programming Interface that it the manufacturer or develop software that is running on system or device. The advantage of using the Application Programming Interface is that we can develop a better program in a very manner by using the API.

5 0
4 years ago
which of these is a placeholder in a document into which variable data is inserted during the process of a mail merge?
Margarita [4]

Answer: C. Merge Field.

The Merge Field is a placeholder that holds the variable data that will be inserted into the main document during a mail merge procedure. The columns in a document may represent the categories of information. The Rows represent the records of the different columns. The computer counts a row of data to be a single record.

7 0
3 years ago
Read 2 more answers
Normal view
Amiraneli [1.4K]
Normal View is the place where creating and editing occurs slide panel. This is where you can write or edit kind of information or images you wanted to show in your power point presentation. 
3 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following might indicate a source on the internet is NOT reliable?
    6·1 answer
  • How do I only give 5 points and not 10?
    7·1 answer
  • "______" is a wireless local network that uses high frequency radio signals to transmit an Internet signal from a wireless route
    9·1 answer
  • Which Step did Mario forget ​
    11·1 answer
  • Gear systems with __________ can have both drive and driven gears on the same shaft. a. an odd number of gears b. an even number
    6·1 answer
  • 1.Can ICTs be innovatively used in the absence of minimum literacy levels among the poor?
    5·1 answer
  • What are the three types of mergers?
    8·1 answer
  • ____ a British mathematician devolved the concept of a programmable digital computer and worked with Ada Lovelace to design the
    13·1 answer
  • How do I convert years to days on Python. For example, if I were to enter 3 years it should output "You are 1095 days old".
    5·1 answer
  • A computer is the __________ of an attack when it is used to conduct an attack against another computer.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!