C Program using array with loop


In this program, You will learn how to implement array with loop in c.


for (i = 0; i < 10; i++) {

cin >> arr[i]; }


Example: How to implement array with loop in c

Run it Now
#include<stdio.h>

int main() {

   int arr[10], i;

   printf("Enter 10 Numbers :");
   for (i = 0; i < 10; i++) {
       scanf("%d", &arr[i]);
   }

   printf("\nList of Array :");
   for (i = 0; i < 10; i++) {
       printf("%d ", arr[i]);
   }

   return 0;
}

Output:

Enter 10 Numbers :10 20 30 40 50 60 70 80 90 100
List of Array :10 20 30 40 50 60 70 80 90 100