Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- float VBOX();
- float SBOX();
- //float VSPHERE();
- int main(){
- float L,W,H,Vb,Sb;
- printf("\nEnter a value for W: ",W);
- scanf_s("%f",&W);
- printf("\nEnter a value for L: ",L);
- scanf_s("%f",&L);
- printf("\nEnter a value for H: ",H);
- scanf_s("%f",&H);
- Vb = VBOX(W,L,H);
- printf("\nThe volume of the box is: %.2f\n",Vb);
- Sb = SBOX(W,L,H);
- printf("\nThe surface area of the box is: %.2f\n",Sb);
- // printf("\nThe volume of the sphere of %f",VS);
- }
- float VBOX(float W, float L, float H){
- float Vb;
- Vb=W*L*H;
- return Vb;
- }
- float SBOX(float W, float L, float H){
- float Sb;
- Sb=2*(W*L+W*H+L*H);
- return Sb;
- }
- //float VSPHERE(){
- // float W,L,H,R,VS;
- // VS=(4/3)*pi*(R*R*R)
- // return VS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement