Hi all,
First I want the user to input values in 10 numbered-array
If any number is less than 50 , the user must replace it by scanf.
This is what I have for now :
First I want the user to input values in 10 numbered-array
If any number is less than 50 , the user must replace it by scanf.
This is what I have for now :
Code:
#include <stdio.h>
#define N 5
int main()
{
int array[N];
int i,element;
printf("Enter the array:>");
for (i=0;i<N;i++) {
scanf("%d",&array[i]);
if (array[i]<=50){
element=array[i];
scanf("%d",&element);
}
}
printf("Your Array is:>\n");
for (i=0;i<N;i++)
printf("%d\n",array[i]);
return 0;
}
Comment