www.cprogramming.tk

www.cprogramming.tk

Program to calculate Area of Square.

A program that get hight and width from userand calculate Area of a Square:

formula for area

 using namespace std;
#include<iostream>
#include<conio.h>
int main()
{
float hight,width,area;
cout<<"Enter Hight:";
cin>>hight;
cout<<"Enter Width:";
cin>>width;
area = hight * width;
cout<<"Area of Square="<<area;
getch();
return 0;
}


we can also make program that use:

  • triangle formula
  • perimeter of square
  • geometry formulas 
  • volume formula
  • etc...

Program to calculate Area of Square. Program to calculate Area of Square. Reviewed by Shoaib Jameel on 13:27 Rating: 5

No comments:

Powered by Blogger.