click on this link......

LinkGrand.com

Friday 11 January 2013

To print series from 1,4,9,16,25,36,49,64,81,100.

#include<stdio.h>
#include<conio.h>
void main()
{
             int i;
            
             for(i=1;i<=10;i++)
             {
                      printf("\n%d",i*i);
            }
            getch();
}

program to print series 1,4,9,16,25......,100


output for series 1,4,9,16,25......,100

       

10 comments:

  1. Write a program to generate the first n terms in the series --- 1,4,9,16,25, ....




    Input Format:

    Input consists of a single integer which corresponds to n.




    Output Format:

    Output consists of the terms in the series separated by a blank space.




    Sample Input:

    7




    Sample Output:

    1 4 9 16 25 36 49

    ReplyDelete
  2. attempt the same.. just delete the printf statement of entering the last number, only use the scanf

    ReplyDelete
  3. given the following series,
    1,4,9,16,............
    write a c++ fragment code using for loop that calculates the sum of N terms

    ReplyDelete
  4. please print the series 1,4,9,16,25 using algorithm and flow chart.....

    ReplyDelete
  5. pls help about this summer using for loop
    1+4-9+16-25+...so on

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete