Calculate the total area and volume occupied by a cylinder.
Correct or not?
#include <stdio.h>
#include <math.h>
int main()
{
float At, V, r, h;
printf("\n ===========Calculate the total area and volume occupied by a cylinder============\n");
printf("\n the base radius.......: ");
scanf("%f", &r);
printf("\n Cylinder height.: ");
scanf("%f", &h);
At = ((2 * M_PI * r * r) + (2 * M_PI * r * h));
V = (M_PI * r * r * h);
printf("\n Area = %f", At);
printf("\n Volume = %fnn"\n, V);
printf("\n");
}