Search This Blog

Translate

sum of first 50 number using goto c program

sum of first 50 number using goto c program,  c program to find sum of first 50 number using goto

#include"stdio.h"
#include"conio.h"
void main()
{
    int no=1,sum=0;
    clrscr();
    LABEL:
    if(no<51)
    {
        sum=sum+no;
        no++;
        goto LABEL;
    }
    printf("The sum of first 50 number is= %d",sum);
    getch();
}

 

sum of first 50 number using goto c program,  c program to find sum of first 50 number using goto

 

C Program example List

Google+ Badge