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
Given the class 'ReadOnly' with the following behavior: A (protected) integer instance variable named 'val'. A constructor that
Dafna1 [17]

Answer:

I believe you want a subclass so here it is!

public class ReadWrite extends ReadOnly {

public ReadWrite(int initialValue){

super(initialValue);

}

private boolean modified = false;

public void setVal(int x) {

val = x;

modified = true;

}

public boolean isDirty() {

return modified;

}

}

Explanation:

I might be wrong, just check through it in case

Hope this helped

:)

7 0
3 years ago
Smith wants to get a job in network systems. Which major should he choose to give him the best chance of getting a job?
Sever21 [200]
<span>computer engineering</span>
5 0
4 years ago
Read 2 more answers
What kind of internal factors influence the process of business enterprise
fgiga [73]

Answer:

The three main internal factors are:

Human resources

Finance

Current or modern technology

Explanation:

Financial resources like funding, investment opportunities, and sources of income.

Physical resources like the company's location, equipment, and facilities.

Human resources like employees, target audiences, and volunteers.

4 0
2 years ago
Active cell is indentifed by its thick border true or false​
Effectus [21]

Answer:  It's identifed by its thick border so its true

8 0
3 years ago
Read 2 more answers
Amber wants to give her audience copies of her presentation so they can follow along and take notes. What option should Amber ch
blagie [28]

Answer:

Print handouts

Explanation:

I had this question and even if you didn't put the answer options i knew what it was I hope this helped you out (:

6 0
3 years ago
Read 2 more answers
Other questions:
  • State one advantage of organising data into columns and rows
    11·1 answer
  • What size hard disc is recommended for powerpoint writting
    14·1 answer
  • The computers connected to the main server are called ______.
    14·2 answers
  • What is a algorithm?
    11·2 answers
  • Which of the following is an advantage of using proprietary licensed software? The software’s source code can be easily modified
    7·2 answers
  • What is renewable energy
    13·2 answers
  • Why a management-focused program provides a more appropriate learning path for you than a program based heavily on technical con
    8·1 answer
  • In 1-2 sentences, describe how to use the thesaurus in the Word Processor you have used.
    7·2 answers
  • The gene form of a trait is called a(n) ​
    10·1 answer
  • Write a program that defines an array of integers and a pointer to an integer. Make the pointer point to the beginning of the ar
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!