Daffodil International University
Problem Link
//Please follow from main function
#include<stdio.h>
int main(){
int i, x[10], j;
for(i=0; i<10; i++){
scanf("%d", &x[i]);
if(x[i]<=0){
x[i]=1;
printf("X[%d] = %d\n",i, x[i]);
}else{
printf("X[%d] = %d\n",i, x[i]);
}
}
return 0;
}
0 Comments