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








}


Comments

Popular posts from this blog

Write a Program to Add two 3x3 Matrix using C

C program for Unit Conversion

Write a Program to Add two 5x5 Matrix using C