#include<stdio.h>
#include<conio.h>
int i,j;
void main()
{ clrscr();
for(i=1;i<=9;i++)
{
printf("%d",i);
if(i==1)
continue;
if(i%2!=0)
{printf("%d",i);
}
}
Objective :
i want to store the output of this series in an integer array ..
and print the sum
the average of the numbers
and sq. of sum of the numbers of the series by functions
problems:
if i declare an array and use a 2nd loop and use i as both the array's index and the 2nd loop's index then i can't get to store elements of the series in the array
i tried to use 2 seperate arrays but that didn't work for me either as i couldn't merge both of them into another array
so then i could use that third array in the functions .. and even then how would i use the array in the functions .. by another loop ?

New Topic/Question
Reply



MultiQuote





|