распечатать массив в c
int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
int i;
for (i = 0; i < 10; i++) {
printf("%d ", array[i]);
}
Marton
int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
int i;
for (i = 0; i < 10; i++) {
printf("%d ", array[i]);
}
for (int i = 0; i < length; i++)
{
printf("%d ", arr[i]);
} //Change "length" to size of your own array and rename "arr" to your own array name
#include <stdio.h>
int main()
{
int a[1000],i,n;
printf("Enter size of array: ");
scanf("%d",&n);
printf("Enter %d elements in the array : ", n);
for(i=0;i<n;i++)
{
scanf("%d", &a[i]);
}
printf("\nElements in array are: ");
for(i=0;i<n;i++)
{
printf("%d ", a[i]);
}
return 0;
}