The question asking me to output backward, is it the same meaning as inverse output??
this is what I've done so far :
any suggestion ?
Thanks
this is what I've done so far :
Code:
/*Q3) Develop a C program that inputs a list of
numbers, letting the user decide how many.
Output the list backwards, but only output
numbers greater than 20?*/
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i,N;
int array[200];
printf("Input The Size of the array you wish:\n");
scanf("%d",&N);
printf("Input the array of size %d:\n",N);
for (i=0;i<N;i++)
scanf("%d",&array[i]);
printf("*****************\n");
printf("The New array With backward order is:\n");
for(i=N-1;i>=0;i--)
if(array[i]>20)
printf("%d\n",array[i]);
return 0;
}
Thanks
Comment