Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //drndf
- #include <cstdio>
- #include <iostream>
- #include <cmath>
- int main()
- {
- double R;
- double H;
- printf("Enter \"r\":");
- std::cin>>R;
- printf("Enter \"h\":");
- std::cin>>H;
- double b=M_PI*R*R;
- double S=(2*M_PI*R*H)+(2*b);
- double V=b*H;
- printf("Result: S=%g V=%g", S, V);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement