Computer Science, asked by mankoo1, 1 year ago

program to print the series 0,3,8,15,24,35,48,63

Answers

Answered by siddhartharao77
14
# include<stdio.h>

void main()
{

int i;

for(i = 1; i <= 10; i++)
{
printf("%d", i * i-1);
}

getch();

}

Answered by franktheruler
3

Answer:

void main

{

 int i , n, p ;

printf ( enter the value of n );

scanf ( " %d ", & n) ;

for ( i =1 ; i <= n ; i++ )

{    

  p = ( i ∧ 2 ) -1 ;

  printf ( " %d " , p) ;

}

}

for loop is used when the number of iteration is known. Basically it is used when we do same work repeatedly.

printf is used for printing a message.

scanf is used for taking input.

Similar questions