#include<stdio.h>
int main()
{
int i,n;
int arr[10];
for(i=0;i<=9;i++){
scanf("%d",&arr[n]);
if(arr[n]<=0)
printf("X[%d] = 1\n",i);
else
printf("X[%d] = %d\n",i,arr[n]);
}
return 0;
}
int main()
{
int i,n;
int arr[10];
for(i=0;i<=9;i++){
scanf("%d",&arr[n]);
if(arr[n]<=0)
printf("X[%d] = 1\n",i);
else
printf("X[%d] = %d\n",i,arr[n]);
}
return 0;
}
No comments:
Post a Comment