Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main(void){
- float r1,r2,r3,pi=3.14159265359;
- printf("radio circunferencia 1:");
- scanf("%f", &r1);
- printf("radio circunferencia 2:");
- scanf("%f", &r2);
- printf("radio circunferencia 3:");
- scanf("%f", &r3);
- float p1,p2,p3;
- p1=2*pi*r1;
- p2=2*pi*r2;
- p3=2*pi*r3;
- float a1,a2,a3;
- a1=pi*pow(r1,2);
- a2=pi*pow(r2,2);
- a3=pi*pow(r3,2);
- printf("RADIO\t\t\tPERIMETRO\t\t\tAREA\n");
- printf("=====\t\t\t=========\t\t\t=====\n");
- printf(" %.0f\t\t\t %.2f\t\t\t\t%.2f\n",r1,p1,a1);
- printf(" %.0f\t\t\t %.2f\t\t\t\t%.2f\n",r2,p2,a2);
- printf(" %.0f\t\t\t %.2f\t\t\t\t%.2f\n",r3,p3,a3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement