Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include<iostream>
  2. #include<conio.h>
  3. int cube(int c);
  4. int n;
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. cout<<"Enter an integer: ";
  10. cin>>n;
  11. cout<<"The cube of "<<n<<" is : "<<cube(n)<<endl;
  12. return 0;
  13. }
  14.  
  15. int cube(int c)
  16. {
  17. c = n * n * n;
  18. return(c);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement