Write a C++ Program Which will generate following Series:1,4,9.....N^2.


SUBMITTED BY: Nrupeshsinh

DATE: June 25, 2016, 12:17 p.m.

FORMAT: Text only

SIZE: 213 Bytes

HITS: 446

  1. # include<iostream.h>
  2. # include<conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. int n,i;
  7. cout<<"Enter NO till where you Want to print series :";
  8. cin>>n;
  9. for(i=1; i<=n; i++)
  10. {
  11. cout<<i*i<<",";
  12. }
  13. getch();
  14. }

comments powered by Disqus