Write C Program to Calculate Sum Of N Natural Numbers In C Programming - 99webcode

Write C Program to Calculate Sum Of N Natural Numbers In C Programming - 99webcode

Write C Program to Calculate Sum Of N Natural Numbers In C Programming - 99webcode




#include<stdio.h>

int main()

{

int i ,n ,sum=0;

printf("enter the number\n");

scanf("%d",&n);

for(i=0;i<=n;i++)

      {   

sum=sum+i;

}

printf("sum of all number between number is : %d\n",sum );


}

}

Post a Comment (0)
Previous Post Next Post