Advertisement
vadimpirog

Untitled

Nov 12th, 2021
749
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.     double h = 0;
  5.     double r1 = 0;
  6.     double r2 = 0;
  7.     const double pi = 3.1415;
  8.  
  9.     scanf("%lf %lf %lf", &h, &r1, &r2);
  10.  
  11.     double V = pi * h * (r1*r1 - r2*r2);
  12.     double S = 0;
  13.     double S1 = 0;
  14.  
  15.     printf("V = %lf\n", V);
  16.     printf("S = %lf\n", S);
  17.     printf("S1 = %lf\n", S1);
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement