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
Aight Ik this aint an assignment question but I just need to vent
eduard

Answer:

Your everything

Explanation:

That's your friends opinion that your "ugly" nothing will hurt it you don't take it to the heart. Don't be sorry, if they were truly your friend they wouldn't have said those. Your good yourself you don't have to have to have someone say you are good. You are good as yourself. Don't change, for anyone. Your beautiful. :) <33

4 0
3 years ago
Your computer system is a participant in an asymmetric cryptography system. You've created a message to send to another user. Be
hjlf

Answer: Integrity

Explanation:

Based on the information given, it should be noted that the protection that the hashing activity provides is integrity. In cryptography, hashing is used in the verification of integrity.

To determine integrity, comparison can be made between data and a hash value. When data is hashed at a particular time, the hash value is protected. Then, to ensure integrity, the data can then be hashed again after which it'll be compared to the protected value.

6 0
3 years ago
9) WAp to display the given series<br> 1 2<br> 1 2 3 <br>1 2 3 4 <br>1 2 3 4 5​
vladimir1956 [14]

The program that displays the given series is exemplified below. Also, see the meaning of Java.

<h3>What is Java?</h3>

Java is a class-based, object-oriented general-purpose programming language.

The programming language is designed so that developers may write code anywhere and run it anywhere, regardless of the underlying computer architecture.

It is also known as write once, run anywhere (WORA)

<u>Sample program:</u>

public class KboatPattern

{

   public static void main(String args[]) {

       for (int i = 1; i <= 5; i++) {

           for (int j = i; j >= 1; j--) {

               System.out.print(j + " ");

           }

           System.out.println();

       }

   }

}

Learn more about Java at;
brainly.com/question/26642771
#SPJ1

4 0
2 years ago
Write a method called doubleit that accepts a string parameter and returns that string concatenated with itself. for example, if
Papessa [141]
Def doubleit( string )
    return( string + string )
4 0
3 years ago
Create a class called Book with the following properties using appropriate data types: Title, Author, numberOfPages, Create a se
tamaranim1 [39]

Answer:

I don't know the answer sorry

7 0
4 years ago
Other questions:
  • Windows server 2012 r2 includes hyper-v in which edition(s)?
    12·1 answer
  • Why must programs written in a high-level language be translated into machine language?
    5·1 answer
  • In a real-world environment, changing granularity requirements might dictate changes in primary key selection, and those changes
    15·1 answer
  • You receive an offer in the mail that says you're eligible to win a cash prize if you place some stickers on a form and return i
    5·1 answer
  • What is the function of the &lt; !Doctype &gt; tag?
    12·2 answers
  • A company has a website that has seen a large increase in visitors and they are concerned that if the trend continues, the web s
    13·1 answer
  • HELP ME PLEASEEEE
    8·1 answer
  • Write a statement that calls a function named IncreaseItemQty, passing the variable addStock. Assign mugInfo with the value retu
    12·1 answer
  • Jenny is working on a laptop computer and has noticed that the computer is not running very fast. She looks and realizes that th
    12·1 answer
  • Data files whose records are always retrieved in sequence from the beginning of the file are known as
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!