I have a function pyramid and I want to call it on another script.
Following is my code for the function pyramid:
function [S] = pyramid(V,H)V= input('Enter the value of volume of square pyramid:'); H=input('Enter the value of height of square pyramid:'); S= sqrt(3*V/H); fprintf('The lenght of the side of square pyramid is: %d\n',S)
When I called the function, pyramid(7,3) then I have to enter the value of V and H again but I do not want to enter it again because I put the value 7 and 3 of V and H.
How to solve this problem?
Thank you very much
Best Answer