Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
TAREA M4 - LOTERIA
tst2.c
709 lab 3.1
Pointer Example
c4
example of scanf and basic integer manipulation
blue point
Print hostname
lab2
hello 5