    #include<stdio.h>

     
    void main()
    {
      int a,b,N;
      clrscr();
      printf("enter a number");
      scanf("%d",&N);
      a=1;
      b=0;
      while(a<=N)
      {
         b=b+a;
         a=a+1;
      }
      printf("%d",b);
      getch();
    }