About Lesson
Example:-
WAP to compute cube of a no. using function.
#include<stdio.h>
#include<conio.h>
void main()
{
int c,n;
int cube(int);
printf(“Enter a no.”);
scanf(“%d”,&n);
c=cube(n);
printf(“cube of a no. is=%d”,c);
}
int cube(int n)
{
c=n*n*n;
return(c);
}