using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
int i = 1;
int sum=0;
do
{
sum=i+sum;
i++;
} while (i<=100);
}
}
}
int num=1;
int sum=0;
do
{
sum += num;
num++;
} while (num < 101);
Console.WriteLine(sum);
Console.Read();
class Program
{
static void Main(string[] args)
{
int sum = 1;
int i = 2;
do
{
sum += i;
i++;
}
while(i<101);
Console.WriteLine(sum);
Console.Read();
}
}