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(); }

3 comments:

Anonymous said...

How do you write the number range?

Anonymous said...

c program to find sum of series from 1 to n using do statement

Absar Ahmad Ansari said...

Please tell me the coding of this question with output....
Write a program that reads an expression from the terminal and checks if the brackets are properly matched.