Write a C Program to find the Sum of Square Terms using Goto



GOTO, C Program, Sumit Kar, Timus Rak


#include <stdio.h>

#include <conio.h>


void main()


{

    int s=0,i=1,n;

    printf("\nEnter The Last Term: ");

    scanf("%d",&n);

l1: s=s+i*i;

    i++;

    if (i<=n)goto l1 ;

    printf("\n Sum of Square numbers: %d",s);

    getch();








}


0 Comments