BS (computer science)
programming issues by zeeshan..!!
Pages
home
c++ programs
Softwares
Books
Articles
Tuesday, 5 March 2013
1+(1+2)+(1+2+3)+..........
#include<iostream.h>
#include<conio.h>
main()
{
int a=1;
cout<<a;
for(int i=1;i<5;i++)
{
cout<<"+(";
for(int j=1;j<=i;j++)
{
cout<<j<<"+";
}
cout<<i+1<<")";
}
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment