C++ Programming Code Examples C++ > Computer Graphics Code Examples C++ Programming Code to Calculate Area and Perimeter of Square C++ Programming Code to Calculate Area and Perimeter of Square Following C++ program ask to the user to enter the side length of a square to calculate and display the area and perimeter of the square: #include<iostream.h> #include<conio.h> void main() { clrscr(); int side, peri, area; cout<<"Enter length of a side of square :"; cin>>side; area=side*side; peri=4*side; cout<<"Area = "<<area<<"\tPerimeter="<<peri; getch(); }