/*Before seeing the code solution make sure that you have tried enough. Don’t copy- paste the whole code. Find out the logic. If you face any trouble, just inform me in comment.*/
#include<stdio.h>
main()
{
double a,b,c,x,y,z,r,s,pi=3.14159;
scanf("%lf%lf%lf",&a,&b,&c);
x=0.5*a*c;
y=pi*c*c;
z=0.5*(a+b)*c;
r=b*b;
s=a*b;
printf("TRIANGULO: %.3f\nCIRCULO: %.3f\nTRAPEZIO: %.3f\nQUADRADO: %.3f\nRETANGULO: %.3f\n",x,y,z,r,s);
return 0;
}
#include<stdio.h>
main()
{
double a,b,c,x,y,z,r,s,pi=3.14159;
scanf("%lf%lf%lf",&a,&b,&c);
x=0.5*a*c;
y=pi*c*c;
z=0.5*(a+b)*c;
r=b*b;
s=a*b;
printf("TRIANGULO: %.3f\nCIRCULO: %.3f\nTRAPEZIO: %.3f\nQUADRADO: %.3f\nRETANGULO: %.3f\n",x,y,z,r,s);
return 0;
}
//Happy_Coding
No comments:
Post a Comment