Pages

Saturday, November 30, 2013

Write a program to calculate and print the area of a square in C

Source Code:


1
2
3
4
5
6
7
8
9
#include <stdio.h>
#include <conio.h>
void main (void)
{
   int Height, Width, Area; 
   Height = 8, Width = 5;
   printf("Area of Square = %d", Area);
   getch ();
}// main

Result:


Area of Square = 40

No comments:

Post a Comment