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
ale4655 [162]
3 years ago
9

Create and Provide complete program that includes a comments header with your name, course, section and other program details an

d does the following: 1) prompt the user to provide a side of square 2) get side from the user and store it into variable 3) based on the side value calculate perimeter of the square 4) calculate area of the square 5) calculate diameter of the square The program should provide the following output: Enter the side of a square: 12 The perimeter is 48.0 The area is 144.0 The length of the diagonal is 16.97056274847714
Computers and Technology
1 answer:
agasfer [191]3 years ago
7 0

Answer:

Written using C++

/*Enter Your Details Here*/

#include<iostream>

#include<cmath>

using namespace std;

int main()

{

//1

float side;

cout<<"Enter the side of a square: ";

//2

cin>>side;

//3

float perimeter = 4 * side;

cout<<"The perimeter is "<<perimeter<<endl;

//4

float area = side *side;

cout<<"The area is "<<area<<endl;

//5

float diagonal = sqrt(2 * side * side);

cout<<"The length of the diagonal is "<<diagonal;

return 0;

}

Explanation:

<em>I've added the full source code as an attachment where I used more comments to </em><em>explain </em><em>difficult line</em>

Download cpp
You might be interested in
Explain where the “heart” of the station is and what can be found there? I will mark brainlyest! This is for the ISS (Internatio
Annette [7]

Answer:

Zevzda

Explanation:

Check for yourself if you think i'm wrong

7 0
2 years ago
Read 2 more answers
Plsss help me<br>give two examples of problems that can occur when sytems do not work properly​
melomori [17]

Answer:

Explanation:

1. There can be a run out of something ex. The water cycle we could run out of water if evaporation stops happening

2. Something wont happen ex. In a shoe factory if no one is boxing the shoes the shoes don’t get boxed.

Hope this helps

6 0
2 years ago
Stay at least _____ behind the vehicle ahead of you at all times.
fenix001 [56]

Answer:

B 4 seconds

Explanation:

You should stay 4 seconds away from a vehicle at all times at the same speed as the other vehicle or vehicles.

6 0
2 years ago
Read 2 more answers
How to improve and create beautiful graphic
kaheart [24]

Answer:

Learn OpenGL and any graphics rendering program.

Explanation:

3 0
3 years ago
Server virtualization in windows server 2012 r2 is based on a module called the
alexgriva [62]
<span>Server virtualization in windows server 2012 r2 is based on a module called the</span> hypervisor.
3 0
3 years ago
Other questions:
  • When called upon to give an impromptu speech, it is a good idea to do all of the following, except:
    11·2 answers
  • Write a function that iteratively appends random 1's and 0's to an array to form a binary number. The function returns the binar
    13·1 answer
  • What does zooming do? A. Changes your view of the Frame Editor to be closer or farther away B. Changes your view of the Event Ed
    12·1 answer
  • Which two factors mainly affect ocean tides on earth?
    7·1 answer
  • How to stay organized in an online school?
    7·1 answer
  • How do you make the task bar and e-mail read in larger print
    13·1 answer
  • What is the meaning of the phrase the video has gone viral
    9·2 answers
  • Hat is the purpose of the domain name?
    7·2 answers
  • If a fire should break out in your building, which of the following actions is NOT recommended?
    10·2 answers
  • Which action does not happen in each iteration of the repeat loop in the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!