Area Of Square Example C++ Program
Definition
In classical times, the second power was described in terms of the area of a square, as in the above formula. This led to the use of the term square to mean raising to the second power. Thus the area of the square is twice the length of the square.
Area Of Square Formula
The area of a rectangle is written as,
A=s^2
here, A=Area s=side of the square
Area Of Square Example Program
/*## Area Of Square In C++*/
/*##Calculation C++ Programs, Datatype C++ Programs, Basic C++ Programs*/
#include <iostream>
#include<conio.h>
#include<stdlib.h>
using namespace std;
int main() {
// Declare Variables
float length, area;
cout << "Simple C++ Program : Area Of Square\n";
cout << "\nEnter the Length of Square : ";
cin>>length;
area = length * length;
cout << "\nArea of Square : " << area;
getch();
return (0);
}
Sample Output
Simple C++ Program : Area Of Square
Enter the Length of Square : 6
Area of Square : 36
C++ Common Example Programs
- Factorial Using Loop Example Program In C++
- Factorial Using Function Example Program In C++
- Factorial Using Recursion Example Program In C++
- Find Prime Number ( Method1 ) Example Program In C++
- Find Prime Number ( Method2 ) Example Program In C++
- Fibonacci series Example Program In C++
- Example Program For Multiplication Value Using For Loop In C++
- Area Of Circle Example C++ Program
- Area Of Square Example C++ Program
- Area Of Rectangle Example C++ Program
- Odd Or Even Example C++ Program
- Sum of Digits Example C++ Program
- Circumference Of Circle C++ Example Program
- Simple C++ program for print the sum of all odd numbers from 1 to n
- Simple Program for Convert Feet to Inches In C++ Programming
- Odd Or Even Example C++ Program Using function
Read More Articles
- Simple Merge Sort Program in C++
- Scope Resolution Operator In C++
- Simple Program for Virtual Functions Using C++ Programming
- Simple Class Example Program For Find Prime Number In C++
- Simple Example Program For Parameterized Constructor In C++
- Define Constructor in Outside Class Example Program In C++
- Simple Program for Function Overloading Using C++ Programming
- Simple Program for Single Inheritance Using C++ Programming
- Simple Example Program For Copy Constructor In C++
- Simple Program for Inline Function without Class Using C++ Programming
- Simple Example Program For Constructor Overloading In C++
- Factorial Using Function Example Program In C++
- Simple Example Program for Inline Function Using C++ Programming
- Simple Addition ( Add Two Integers ) Example Program
- Simple Example Program For Constructor In C++
- Simple Stack Program in C++ Programming
- Factorial Using Loop Example Program In C++
- Simple Program for Read user Input Using cin
- Simple Program for Friend Function Using C++ Programming
- Simple Program for Static Data and Member Function Using C++ Programming
- Simple Program for Multiple Inheritance Using C++ Programming
- Simple Copy Constructor Example Program For Find Factorial In C++
- Simple Program for Unary Operator Overloading Using C++ Programming
- Simple Program for Virtual Base Class Using C++ Programming
- Do While Loop Example Program In C++