#include <stdio.h>
#include <conio.h>
#include <math.h>
#define pi 3.14;
extern float r;
int alan();
int cevre();
int main()
{
int secim=0;
float sonuc=0.0;
printf("alan(1) cevre(2) cikis(-1)");
printf("\n seciminizi giriniz");
scanf("%d",&secim);
while(secim !=-1);
{
switch(secim)
{
case 1: sonuc=alan();break;
case 2: sonuc=cevre();break;
default: printf("secimleriniz yalnis\n");break;
}
printf("secimnizini giriniz");
scanf("%d",&secim);
}
getch();
return 0;
}
int alan()
{
float r;
float a=0;
printf("dairenin yaricapini giriniz");
scanf("%f",&r);
a=r*pi;
printf("alan :%f",a);
return 0;
}
int cevre()
{
float c,r;
printf("cemberin yaricapini girin");
scanf("%f",&r);
c=pow(r,2)*pi;
printf("cevre:%f",c);
return 0;
}