Skip to content

Instantly share code, notes, and snippets.

@programmingfaster0226
Created June 18, 2018 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programmingfaster0226/17d54b5798b3c5811e957e1600e14cae to your computer and use it in GitHub Desktop.
Save programmingfaster0226/17d54b5798b3c5811e957e1600e14cae to your computer and use it in GitHub Desktop.
programmingfaster.com
#include<stdio.h>
#include<conio.h>
#define pi 3.14
void main()
{
float r1,r2,a1,a2,area;
printf("enter the radius of large circle");
printf("%f",&r1);
printf("enter radius of small circle");
scanf("%f",&r2);
a1=pi*r1*r1;
a2=pi*r2*r2;
area=a1-a2;
printf("the area of the first circle is :%.2f",a1);
printf("\n the area of second circle is:%.2f",a2);
printf("\n the area between two circles is:%.2f",area);
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment