I am having some issues with a class assignment I am working on. It would be great if anyone could tell me why this is not running. It keeps telling me that the length/width/radius on lines 26/29/32 respectively are missing identifiers. Also on lines 25/28/31, it says "syntax error : missing ';' before 'type'". I am new to all this and it is my first semester, so I am very much still prone to making plentiful mistakes.
GetNum is effectively scanf, and you are calling it, and scanf!
Also you never supplied parameters to the GetArea functions (AreaR, AreaC)!
Fixed Main (untested):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
int main() {
printf("Please enter the length of the rectangle: ");
int Length = GetNum();
printf("Please enter the width of the rectangle: ");
int Width = GetNum();
printf("Please enter the radius of the circle: ");
int Radius = GetNum();
printf("The area of the rectangle is %d.\n", CalcAreaR(Length, Width));
printf("The area of the circle is %f.\n", CalcuAreaC(Radius));
return 0;
}