answersLogoWhite

0


Best Answer

This smells like homework, so I won't give you any actual code. Rather, I'll give you some pseudo-code for the function that returns the area:

calcarea (decimal width, decimal length)

return width * length

P.S., jeez, it's not that hard to do your homework, is it?

User Avatar

Wiki User

βˆ™ 14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

βˆ™ 14y ago

#include<iostream>

using namespace std;

int main()

{

int side,area;

cout<<"Please,Enter the length of the square side : ";

cin>>side;

area=side*side;

cout<<"The square's area is = "<<area<<endl;

return 0;

}

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 13y ago

What sort of square do you want to make.

Tri square

"T" square

Round square

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 14y ago

by using \xdb

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program for area of square in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a c program to find Volume and surface area of cube?

Write a c program to compute the surface area and volume of a cube


Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


A c program to square matrix?

A C program to square matrix is a math problem. In the math problem you write down all the outer boundary values of matrix in a circle, then write down the inner value.


How do you write a c program to find square of a no using call by value?

int square (int N) return N*N;


How do you find an area of a shape rectangle square and a circle in C program?

By using that one thing.


Write a c program to find the area and perimeter of circle?

Learn c programming and geometry. It will be easy when you know both.


Write a c program for creating a virus?

a c program for creat a virus


Write C program using functions to simulate a Calculator with the basic functions - square root and reciprocal?

trytytytytytytytytrf 6 bcvvtgujhy6


How do you write a c plus plus program to find area of a triangle?

If you want to use object oriented approach, create a class with the details of triangles as it's data members and area function as member or friend function. formula: 1. area= height*base/2 2. area= square-root(s*(s-a)*(s-b)*(s-c)) where 2s=a+b+c


Where do we write main function in a c program?

Into the source program.


How do you write a c program to analysis a circuit?

There is no need to write a C program for circuit analysis; there are lots of packages out there that already do that (for example, Spice).


How do you write Square and cubes c program?

double square (double x) { return x*x; } double cube (double x) { return x*x*x; }