WAP to find cube of an integer using inline function.
#include<iostream> #include<conio.h> using namespace std; int cube(int n) { return(n*n*n); } int main() { int n; cout<<"Enter any number : ";cin>>n; cout<<"Cube of "<<n<<" is "<<cube(n); getch(); return(0); }
No comments:
Post a Comment