this is not an exam question or homework. This is an image from the quiz I entered this morning. I could not do the question, I'm still struggling
function volume_hprism(a,n)
hh=input("Enter the height of prism:");
h=1:hh;
a=2;
n=3;
V=7/4*a*n*h;
table=[h;V]';
disp("Volume of a heptagonal prism with a side lenght 2 and an apothem lenght 1.5 m.");
disp("Height(m) V(m^3)")
fprintf("%3.0f\t%10.4f\n",table)
endfunction
0 Comments
Sign in to comment.