How to find surface area of a cylinder in C || Functions in C || No Arguments and No Return value || C Programming
In this, we are going to see the Functions that have no arguments and no return value, this program we are going to find the Surface Area of Cylinder in C Programming Language.



#include <stdio.h>
#include <stdlib.h>
#include <math.h>

const float pi = 3.142;

float op()
{
    float r, h;
    printf("Enter the radius of the cylinder: ");
    scanf("%f", &r);
    printf("Enter the height of the cylinder: ");
    scanf("%f", &h);        
    float surface_area;
    surface_area = (2 * pi * r * h) + (2 * pi * r * r); 
    printf("Surface area of cylinder is: %f", surface_area);
}

float main()
{
    system("cls");
    op();
    return 0;
}

//........Coded by JAIDEEP JAMBLE



#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post