Hi, can someone help me with this. I keep getting the too few arguments to function and I'm not sure why. Im new into programming.
Code:
#include<stdio.h>
#include<math.h>
float total_s_area(float b, float p)
{
return (b + (1.0/2)* p);
}
float volume(float b, float h)
{
return ((1.0/3) * b * h);
}
int main()
{
float w, h;
float parameter, result;
printf("Enter the width of the pyramid: ");
scanf("%f", &w);
printf("Enter the height of the pyramid: ");
scanf("%f", &h);
printf("Enter the parameter of the pyramid: ");
scanf("%f", ¶meter);
// total area
result = total_s_area(parameter/6); //function call
printf("The total area of pyramid = %.6f\n", result);
//volume
result = volume(parameter/6);
printf("The volume of the pyramid = %.6f\n", result);
system ("PAUSE");
return 0;
}
yes I read the post about tags but I'm new so please bear with me