#include<stdio.h>
int main()
{
	int i;
	float base,height,area,width,length,area1,side,area2,radius,area3;
	scanf("%d",&i);
	switch(i)
	{
		case 1:
	printf("Enter Base:");
			scanf("%f",&base);
			printf("Enter Height");
			scanf("%f",&height);
			area=0.5*base*height;
			printf("Area of Triangle=%f\n",area);
			break;
		case 3:
			printf("Enter Width:");
				scanf("%f",&width);
				printf("Enter Length:");
				scanf("%f",&length);
				area1=width*length;
				printf("Area of rectangle=%f\n",area1);
				break;
	    case 7:
                printf("Enter Side:");
				scanf("%f",&side);
				area2=side*side;
				printf("Area of Square=%f\n",area2);
			break;
default:
			printf("Enter radius:");
			scanf("%f",&radius);
			area3=3.14*radius*radius;
			printf("Area of Circle=%f\n",area3);
		}
	return 0;
}
#include<stdio.h>
int main()
{
	float area,base,height,area_rec,width;
	printf("Area:");
	scanf("%f",&area);
	printf("Base:");
	scanf("%f",&base);
	height=((2*area)/base);
	printf("Height=%f\n",height);
	printf("Area Of Rectangle:");
	scanf("%f",&area_rec);
	width=area_rec/height;
	printf("Width=%f",width);
	return 0;
	}
#include<stdio.h>   
int main()  
{  
  int a,b;  
  printf("enter the value of a");  
  scanf("%d",&a);  
  if(a<0)  
  {  
   b=a*-1;  
   printf("\nabsolute value of %d is %d",a,b);  
  }  
  else  
   {  
     printf("\nabsolute value=%d",a);  
   }  
   return 0;  
}  
#include<stdio.h>
int main()
{
int m;
printf("enter the value of m:");
scanf("%d",&m);
(m>=0?printf("%d",m):printf("%d",-(-m)));
return 0;
}
#include<stdio.h>
int main()
{
int year;
scanf("%d",&year);
if(((year%4==0)&&(year%100!=0))||(year%400==0))
{
printf("%d is leap year",year);
}
else
printf("%d is not leap year",year);
return 0;
}

#include<stdio.h>
int main()
{
	char ch;
	int a,b;
	scanf("%c",&ch);
	scanf("%d%d",&a,&b);
	if(ch=='A')
	{
		printf("%d",a+b);
	}
			else if(ch=='S')
		{
			printf("%d",a-b);
		}
			else if(ch=='M')
		{
			printf("%d",a*b);
		}
			return 0;
	}
    #include<stdio.h>
    int main()
    {
       char ch;
       printf("Enter a character");
       scanf("%c",&ch);
      if(ch>='A'&& ch<='Z')
         printf("\n Character %c is capital letter",ch);
      else if (ch>='a'&& ch<='z')
             printf("\n character %c is smalll case letter",ch);
      return 0;
    }

#include<stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	if(n<=10)
	{
		printf("%d",n*n);
	}
	else if(n>10&&n<=20)
	{
		printf("%d",n*n*n);
	}
	else if(n>20)
	{
		printf("Invalid Number");
	}
	return 0;
}