1main()
2 {
3  inti, sum;
4   cin>> i;
5   sum  = 0;
6   while(i<=10)
7   {
8   sum=sum+i;
9   ++i;
10    }
11 cout<<sum;
12 cout<< i;
13   }
Algorithm 2: An example program.