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]
2 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]2 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
Create an array of 10 fortune cookie sayings that will be randomly displayed each time the user reloads the page. The fortune wi
vfiekz [6]

Answer:

let cookieNumber = Math.floor(Math.random() * 10)

switch (cookieNumber) {

  case 1:

   document.write('Fortune 1')

   break;

  case 2:

   document.write('Fortune 2')

   break;

   case 3:

   document.write('Fortune 3')

   break;

  case 4:

   document.write('Fortune 4')

   break;

  case 5:

   document.write('Fortune 5')

   break;

  case 6:

   document.write('Fortune 6')

   break;

  case 7:

   document.write('Fortune 7')

   break;

  case 8:

   document.write('Fortune 8')

   break;

  case 9:

   document.write('Fortune 9')

   break;

  case 10:

   document.write('Fortune 10')

Explanation:

The cookieNumber is generated using Math.random(), which is rounded to a whole number using Math.floor(). Then, a switch block is used to display a different fortune depending on the value of cookieNumber.

4 0
2 years ago
Discuss the benefits of a system safety effort other than improved safety
klio [65]

Answer: Safety effort of system is defines as the measures that are taken to provide and maintain the protection of the system.There are several methods ,tool and efforts made for the system security .Benefits of the system security are as follows:-

  • Takes control over the hazardous situation and maintain the security
  • System security will also increase the development of the system easily.
  • Approach towards the analyzing of the system function
  • Data, information and functions are safe from being detected in unauthorized way.
  • Functions and implementation is made easy without the fear of getting attacked or hacked.

8 0
3 years ago
Which of these about non-disclosure agreements is accurate?
grandymaker [24]

Answer: number 2

Explanation: number 2

6 0
2 years ago
Read 2 more answers
In many DBMSs where no strict separation of levels is maintained, this one language is used by the DBA and database designers to
marissa [1.9K]

Answer: False

Explanation:

This means that the mappings between the two schemas may be specified in either one of these languages.In most relational DBMSs today, there is no specific language that performs the role of SDL. Instead, the internal schema is specified by a combination of functions, parameters, and specifications related to storage. These permit the DBA staff to control indexing choices and mapping of data to storage

5 0
2 years ago
Which is the most visual social media site?
Aleks04 [339]
Enge extrapolated this analysis across the 2.2 billion<span> users on Google and concluded that while the “active profiles” on Google+ amount to </span>111 million<span> users, only 6.7 million users have 50 or more posts ever, and only 3.5 million have 50 or more posts in the last 30 days</span>
3 0
3 years ago
Other questions:
  • Selecting the option to control Widows and Orphans will prevent _________. A single line from appearing at the top or bottom of
    10·1 answer
  • What command would you use to list the text files in your
    7·1 answer
  • It is important for a writter to include voice and point of view in writting because _______
    11·1 answer
  • X = 0
    15·1 answer
  • ___ involves connecting geographically remote computers into a single network and combining the computational power of all compu
    14·1 answer
  • Which of the following is one of the options available on the Columns menu on the
    6·1 answer
  • Desirable workplace habits and skills include:
    14·1 answer
  • Please help me I don't understand. It's Python.
    5·2 answers
  • We cannot imagine a life without the Internet. Imagine that you had to live without being connected to the Internet. Discuss the
    13·1 answer
  • Compare and contrast the leadership and leadership and management style of apple and Samsung ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!