Write a code to Find the volume of cube using "c language" .

 

Hello friend’s

Today we are learn how to find volume of Cube using c language we write a code for that , so we all known that the formula for volume of cube that is L3 and  this thing we are write in form of code in c language , so first fall we know our five basic steps which are common in very program in c language and this think am explaning you previously .this is very basic think ,I think you all already know about this if not please check previous blog.

Now we are write our program for find volume of cube (by using formula of volume of cube that is L3) we take input from user by using function “scanf”and "arithmetic operators"(arithmetic operators are nothing but +,-,*,/) ,let’s start to write our program

#include <stdio.h>

int main()
{
    printf("Here find the value of any cube in meter\n");
    int length;
    printf("enter the length of any edge=");
    scanf("%d",&length);
    printf("volume of cube=%d",length*length*length);
    printf("m");

    return 0;
}

 

Thank-you guys keep learning

2 Comments