"C" Set Circle radius r = 1.5, cylinder height h = 3, circle length, circle area, sphere surface area, sphere volume, cylinder volume

Source: Internet
Author: User
Set the circle radius r = 1.5, the cylinder height H = 3, the circumference is long, circle area, sphere surface area, sphere volume, cylinder volume//requirements: With scanf input data, take the decimal point two # # # # # <stdio.h>int Main () {float r,h; float C,s,sq,vq,vz;float pai = 3.1415926;printf ("Please enter circle Radius:"), scanf ("%f", &r);p rintf ("Please enter cylinder High:"); scanf ("%f", &h) ; c = 2 * Pai * r;s = Pai * r * r;sq = 4 * Pai * r * r;vq = (4/3) * Pai * R * r * R;vz = S * h;printf ("Circle circumference:%4.2f\n", c) ;p rintf ("Circle area is:%4.2f\n", s);p rintf ("Sphere surface area is:%4.2f\n", sq);p rintf ("Sphere volume is:%4.2f\n", VQ);p rintf ("Cylinder Volume:%4.2f\n", VZ); return 0;} 

"C" Set Circle radius r = 1.5, cylinder height h = 3, circle length, circle area, sphere surface area, sphere volume, cylinder volume

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.