Sunday 8 April 2012

Write a Program to Find The Area of a Circle,Given The Radius

#include<conio.h>
#include<iostream.h>
#include<math.h>

void main()
{
 clrscr();

  int r;
  float P=3.14,area;
  cout<<" enter the radious of a circle  ";
  cin>>r;
  area=P*r*r;

  cout<<"The Area of Circle is"<<"= "<<area;
       getch();

}

No comments:

Post a Comment

Write a program which reads a set of integers into an integer array and then prints "YES"if all of them are same otherwise print "NO".

#include<stdio.h> int main() { int a[10],M=0,i,n; printf("enter a value for n\n"); scanf("%d",&n); fo...