My Subject Blog

C Program to Find Cube using Function

/*
Write a Program using function to Find out Cube of any given number N.
*/

#include <stdio.h>
int cube(int);
int main(void) 
{
int n;
printf("Enter Any Number N : ");
scanf("%d",&n);
printf("\n Cube = %d",cube(n));
return 0;
}

int cube(int n)
{
return (n*n*n);
}  

Comments

Most Visited Post

C Program to Find Largest Odd Number from Array

Followers