Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
/**Bismillahir Rahmanir Rahim.**/ #include <stdio.h> int main() { double A[100]; int i; for(i=0; i<=99; i++) scanf("%lf", &A[i]); for(i=0; i<=99; i++) { if(A[i]<=10.0) printf("A[%d] = %.1lf\n",i, A[i]); } return 0; }
nice
ReplyDeletei think thats wrong, because of the output, the position of the array must be the same when you input
ReplyDelete#include
ReplyDeleteint main()
{
double A[100];
int i;
for(i=0; i<=99; i++)
scanf("%lf", &A[i]);
for(i=0; i<=99; i++)
{
if(A[i]<=10.0)
printf("A[%d] = %.1lf\n",i, A[i]);
}
return 0;
}
reply..
#include
ReplyDeleteint main()
{
int i;
float a[100],n;
for(i=0;i<100;i++)
{
scanf("%f",&n);
a[i]=n;
}
for(i=0;i<100;i++)
{
if(a[i]<=10)
printf("A[%d] = %.1f\n",i,a[i]);
}
return 0;
}
reply..