Guest User

Untitled

a guest
Jun 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include<iostream.h>
  2. #include<conio.h>
  3. class IntArray
  4. {
  5. private:
  6. int ary[5];
  7. public:
  8. IntArray(int a[])
  9. {
  10. for(int z=0;z<5;z++)
  11. {
  12. ary[z]=*a;
  13. }
  14. }
  15.  
  16. void dis()
  17. {
  18. for(int i=0;i<5;i++)
  19. {
  20. cout<<ary[i]<<"\t";
  21. }
  22. }
  23. };
  24. void main()
  25. {
  26. clrscr();
  27. int x[5]={3,7,9,10,4};
  28. IntArray obj(x);
  29. obj.dis();
  30.  
  31. }
Add Comment
Please, Sign In to add comment