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
Write a program that computes the sum of the first tenpositive integers, 1 + 2 + ..+ 10.
Stella [2.4K]

Answer:

#include <iostream>  

using namespace std;

int main()

{

  int sum=0;//taking an integer variable to store the sum with initial value 0..

  for(int i=1;i<=10;i++)//looping from 1 to 10..

  {

      sum+=i;//adding each i in the sum..

  }

  cout<<sum<<endl;//printing the sum..

   return 0;

}

Explanation:

output :- 55

1.I have taken an integer variable sum which is equal to 0.

2.Looping over first ten positive integers.

3.Adding every number to sum.

4.Printing the sum.

6 0
3 years ago
Use the following to calculate the acid-test ratio. (Round your answer to two decimal places.) Cash: $100,000 Short-term investm
uysha [10]

Answer: 0.48

Explanation:

The acid test ratio will be calculated as:

Cash = $100,000

Add: Short term investments = $17,000

Add: Net Current Receivables = $250,000

Total Assets = $367,000

/ Total Current Liabilities = $760,000

Acid Test Ratio will now be:

= Total Assets / Total Liabilities

= $367000/$760000.

= 0.48

Therefore, the acid test ratio is 0.48.

5 0
3 years ago
The mode is least appropriate for:___________
bazaltina [42]

Answer:

Your question seems incomplete

Explanation:

7 0
3 years ago
Davingould1115...................answer 1​
erma4kov [3.2K]

wt ...

I didn't get u..

is it a I'd

8 0
3 years ago
Read 2 more answers
The help desk for company XYZ received a call from a user who could not locate their company-issued smart phone device. The netw
Gnoma [55]

Answer:

In the given scenario, the user may have disabled the profile on the device. That is why the help-desk would not be able to lock the device remotely through the software.

Explanation:

A device can only be located and locked via the MDM software if the profile of the software is active on the device. Else if the profile is disabled there is no more access for the software to the device.

7 0
3 years ago
Other questions:
  • Which was the first media-sharing website that allowed users to submit their own work on the site?
    7·1 answer
  • What does cramming to hand in an assignment
    10·1 answer
  • Sally is editing her science report about living things. She needs to copy a paragraph from her original report.
    15·2 answers
  • 01110111 01101000 01100001 01110100 00100000 01101001 01110011 00100000 00110001 00101011 00110001
    7·1 answer
  • Visme,PowerPoint, keynote and prezi are what kind of software
    15·1 answer
  • A total stranger is trolling Jack online. He’s offended and annoyed. How can Jack stop the troll in his or her tracks? (5 points
    10·2 answers
  • Swapping as applied in memory management with an aid of a diagram​
    13·1 answer
  • HTML, the markup language of the web, specifies colors using the RGB model. It uses a two-digit hexadecimal (that is, base 16) r
    13·1 answer
  • Copying materials from a source text without using is<br> considered plagiarism<br> ?
    5·1 answer
  • What kind of material is used for DRAM (dynamic random-access memory)?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!