Monday, August 1, 2016

Program in C for 1 4 9 16 series upto 20th term using Do- While Loop

/* 1 4 9 16 series upto 20th term */
#include<stdio.h>
#include<conio.h>
void main()
{
    int a,i;
    i=1;
    do
    {
        a=i*i;
        printf("%d ",a);
        i++;
    }
    while (i<=20);
    getch();
}

0 comments:

Post a Comment