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
Sonja [21]
3 years ago
6

A basic program to find the area of a square​

Computers and Technology
1 answer:
uranmaximum [27]3 years ago
4 0

The area of a square is simply the square of the side. So, you only need to write a program that receives a number as input, which is the side of the square, and returns that number squared, which will be the area of the square.

You didn't specify any language, so for example here's a C implementation that receives the side from the user and returns the area:

#include <stdio.h>

int main()

{

   double side, area;

   

   do{

       printf("Enter the side of the square (must be >0): ");

       scanf("%lf", &side);

   } while(side<=0);

   area = side * side;

   printf("The area is %lf", area);

}

You might be interested in
How to print something nad input on same line python
Serhud [2]
To get everything on one line with two inputs is not (easily) achievable, as far as I know. The closest you can get is: print 'I have', a=input() print 'apples and', p=input() print 'pears. '
7 0
2 years ago
The border that defines the outer boundary of a shape or other object
Over [174]
The answer is outline
8 0
2 years ago
What is the purpose of the Excel Function Reference?
Citrus2011 [14]

Answer:

To look up functions and their purposes

Explanation:

Edg

3 0
3 years ago
J=2
leonid [27]

Answer:

yup

tthast right

Explanation:

5 0
2 years ago
How does outlets generate electricity???
dimaraw [331]

Answer:

"a hole is connected to the wire that brings the electricity back to the breaker box. when you turn on a lamp, the hot part of the outlet allows electricity to flow" I got this info from Google.com

Explanation:

4 0
2 years ago
Other questions:
  • Which of the following is an occupation management group? Select the choice that best answers the question.
    15·1 answer
  • On computer X, a nonpipelined instruction execution would require 12 ns. A pipelined implementation uses 6 equal-length stages o
    9·1 answer
  • A manager wants to set up an area that is not on the LAN but not quite on the Internet. This area will house servers that will s
    5·1 answer
  • Answer these two if u can❤️
    5·2 answers
  • Instructions:Select the correct answer.
    8·2 answers
  • While surfing online, Patricia checks her email and reads the latest messages. She then browsers a website and logs in a comment
    8·1 answer
  • What term describes what an actor breaks when he addresses the audience directly from stage, like in Hamlet’s “to be or not to b
    13·2 answers
  • 01:24:3
    11·1 answer
  • What will be result of below if statement.
    13·1 answer
  • What are some of the ways we can resolve IPv4 address shortages? Check all that apply.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!