FIND SUM OF THE SERIES 1+2+3+---------+n USING C PROGRAM

void main() { int r; clrscr(); printf("\nEnter the number range: "); scanf("%d",&r); printf("\nSum of the series is: %d",(r*(r+1))/2); getch(); }
Post a Comment