Surface Area of Right Rectangular Prism || Functions in C || Arguments and Returns a value || C Programming
In this, we are going to see the Functions that have arguments and returns a value, this program we are going to find the Surface Area of Right Rectangular Prism in C Programming Language.



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

float display_output(float l, float w, float h)
{
    float surface_area;
    surface_area = 2 * (w * l + l * h + h * w);
    return surface_area;
}

float main()
{
    system("cls");
    float l, w, h;
    printf("Enter the length of the right rectangular prism: \n");
    scanf("%f", &l);
    printf("Enter the width of the right rectangular prism: \n");
    scanf("%f", &w);
    printf("Enter the height of the right rectangular prism: \n");
    scanf("%f", &h);
    printf("Surface area of right rectangular prism is: %f", display_output(l, w, h));
    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