Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Area of a rectangular prism
//gcc 5.4.0 #include <stdio.h> //A Right square prism is defined as follows: //Where a is the length of the base and h is the height of the prism.The volume of a square prism is: // V=a^2 *h //Use the square function you wrote in the //previous problem to write a function that calculates V and call this function from main function double BaseArea(int a){ double asq=a*a; return(asq); } int main(void){ double a=2; double h=4; double v=BaseArea(a)*h; printf("The Area of the rectangular prism is %lf",v); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
CS HW2
CPTTRN_2
Exm
If Statement/ Decrement practice
14th Feb Programming Project v.01
20171117_TARTAGLIA
Area & Perimeter of Circle
a3 commented
quicksort guía 4
bitwise operations
stackse - search stackoverflow differently
Please log in to post a comment.