Partially changed file structure to suit VSCode
This commit is contained in:
@@ -13,12 +13,7 @@
|
||||
*/
|
||||
|
||||
|
||||
float CalculateAreaOfCircle ( float radius )
|
||||
{
|
||||
float area;
|
||||
area = M_PI * radius * radius ;
|
||||
return (area) ;
|
||||
}
|
||||
float CalculateAreaOfCircle ( float radius );
|
||||
|
||||
|
||||
/* Show use of function */
|
||||
@@ -45,3 +40,10 @@ int main (void)
|
||||
// All done
|
||||
return 0;
|
||||
}
|
||||
|
||||
float CalculateAreaOfCircle ( float radius )
|
||||
{
|
||||
float area;
|
||||
area = M_PI * radius * radius ;
|
||||
return (area) ;
|
||||
}
|
||||
@@ -32,8 +32,8 @@ int main (void)
|
||||
// Prompt for and obtain values
|
||||
printf ("Please enter the radius of the cylinder: ");
|
||||
scanf ("%f", &rad);
|
||||
ad
|
||||
printf ("Please enter the length of the cylinder: ");
|
||||
|
||||
printf ("Please enter the length of the cylinder: ");
|
||||
scanf ("%f", &len);
|
||||
|
||||
// Use our function to calculate the area
|
||||
Reference in New Issue
Block a user