Advertisement
adcorp

functn to double a given value

Oct 14th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include<iostream.h>
  2. #include<conio.h>
  3. int two(int);  // use int two(int&) for call by ref.
  4. void main()
  5. {
  6. clrscr();
  7. int x;
  8. cout<<"enter the no: ";
  9. cin>>x;
  10. cout<<" double the no is: "<<two(x);
  11. getch();
  12. }
  13. int two(int x)    // use int two(int&x) for call by ref.
  14. {
  15. int c=2*x;
  16. return c;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement