Write a C++ Program to prints series given by user.


SUBMITTED BY: Nrupeshsinh

DATE: July 4, 2016, 1:49 p.m.

FORMAT: Text only

SIZE: 368 Bytes

HITS: 479

  1. # include<iostream.h>
  2. # include<stdio.h>
  3. # include<conio.h>
  4. class myclass
  5. {
  6. public:
  7. void series()
  8. {
  9. int i,m,n;
  10. cout<<"enter starting value=";
  11. cin>>m;endl;
  12. cout<<"enter ending value=";
  13. cin>>n;endl;
  14. for(i=m; i<=n; i++)
  15. {
  16. cout<<i<<",";
  17. }
  18. }
  19. };
  20. void main()
  21. {
  22. clrscr();
  23. myclass obj;
  24. obj. series();
  25. getch();
  26. }

comments powered by Disqus