Flowchart & C program for find the sum of first 50 Natural numbers.

Flowchart :-




Program :-

#include<stdio.h>                                                        
#include<conio.h>
void main()
{ int number,sum=0;
clrscr();
for(number=1; number<=50; number++)
{
sum=sum+number;
}

printf("Sum of first 50 Natural numbers = %d\n",sum);

getch();
}

Comments