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
OleMash [197]
3 years ago
11

Write a complete program that declares an integer variable, reads a value from the keyboard into that variable, and writes to st

andard output a single line containing the square of the variable's value. Besides the line and the number it contains, nothing else should be written to standard output.
Computers and Technology
1 answer:
Feliz [49]3 years ago
5 0

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

  // variables

  double num;

  // read discriminant

  cin>>num;

  // calculate square of the input

  double result=num*num;

  // print the square number

  cout<<result<<endl;

     return 0;

}

Explanation:

Declare a variable "num".Read the value of "num" from keybord.Then calculate square of the input number.Print the square of input number.

Output:

5

25

You might be interested in
When approaching a bicyclist from the rear, you should slow down and
Veronika [31]

Answer:

A. Wait until it is safe to pass the bicyclist with at least three feet of clearance.

Explanation:

This is one of the traffic safety precautions to follow when driving especially in most parts of the United States of America.

Traffic safety guidelines are a list of Rules and instructions usually available in manuals and online made available by the government to its driving population in order to maintain law and order and prevent accidentals on the road. When effectively followed this guidelines can help to reduce accidents by a high Margin.

4 0
3 years ago
A(n) _____ access file is also known as a direct access file.
zloy xaker [14]
The answer to the question asked  above is <span>remote direct memory .

</span>A remote direct memory  access file is also known as a direct access file.

Hope my answer would be a great help for you.    If you have more questions feel free to ask here at Brainly.

5 0
3 years ago
What underlying concept is edge computing based on?
guajiro [1.7K]

Answer:

Edge computing was developed due to the exponential growth of IoT devices, which connect to the internet for either receiving information from the cloud or delivering data back to the cloud. And many IoT devices generate enormous amounts of data during the course of their operations.

Explanation:

8 0
2 years ago
Read 2 more answers
You and a few friends are having a meal at a pizza restaurant, and the server has just given you the bill. Write a function that
cestrela7 [59]

Answer:

How to calculate the total cost of the meal

For bill inclusive of tax, cost1=cost*(1+tax percentage)

For bill inclusive of tax and tip, cost2=cost1*(1+tip percentage)

Meal cost =(pizza cost*(1+tax percentage))*(1+tip percentage)

Now how to calculate the cost per person

cost per person=meal cost/ number of people.

C language code to solve the above problem is given below with appropriate comments for explanation

Explanation:

#include<stdio.h>

float split_bill(int cost,float tax)

{

//Declaring number of people as int

int number;

//Prompting for number of people

printf("Enter number of people ");

scanf("%d",&number);

//Declaring tip percentage as float

float tip_percent;

//Prompting for tip percentage

printf("Enter tip percentage between 0 and 1 ");

scanf("%f",&tip_percent);

//Calculating total meal cost

float meal=(((float)cost)*(1+tax))*(1+tip_percent);

//Printing total cost of meal

printf("Total cost of meal: %0.2f ",meal);

//Calculating cost per person

float cost_per_person=meal/number;

//Returning cost per person to main function

return cost_per_person;

}

int main()

{

//Declaring pizza cost as int and tax percentage as float

int pizza_cost;

float tax_percent;

//Prompting user for pizza cost

printf("Enter billing amount of pizza ");

scanf("%d",&pizza_cost);

//Prompting user for tax percentage

printf("Enter tax percentage between 0 and 1 ");

scanf("%f",&tax_percent);

//Printing the cost per person by calling the function split_bill

printf("Total cost per person is: %0.2f ",split_bill(pizza_cost,tax_percent));

return 0;

}

8 0
3 years ago
Mr. Lee wants to show his class a presentation. Which device will display an enlarged view of his presentation?
Gnesinka [82]
A projector would make his presentation bigger.<span />
3 0
3 years ago
Other questions:
  • Navigational signs on the highway are often which colors?
    10·2 answers
  • Damion recently did an update to his computer and added a new video card. After the update, Damion decided that he would like to
    13·1 answer
  • Category 6 is an example of a ________ used to connect wired network devices.
    9·1 answer
  • To use a stored address, C provides us with an indirection operator, ____.
    6·1 answer
  • Find some search engine as many that you can find
    9·1 answer
  • The function below takes a string argument sentence. Complete the function to return the second word of the sentence. You can as
    5·1 answer
  • Guys i really need help pleasure?
    7·2 answers
  • Why is the most important factor for investors always the quality of the venture's leadership team
    12·1 answer
  • Microsoft vs Sony who wins ​
    13·2 answers
  • Is y0utube an example of unsupervised learning or supervised learning?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!