#include<iostream>
using namespace std;
int main()
{
int i = 0 ;
int sum = 0;
while(i<=10)
{
sum+=i;
i++;
}
cout<<sum<<endl;
return 0;
}
```cpp
55
Process returned 0 (0x0) execution time : 0.029 s
Press any key to continue.
#include<iostream>
using namespace std;
int main()
{
int i = 0 ;
int sum = 0;
do
{
sum+=i;
i++;
}while(i<=10);
cout<<sum<<endl;
return 0;
}