Hello, I wrote a program for I / O array with a given number of elements, but I do not know how to make the number of elements entered by the user.
#include <stdio.h> #include <stdlib.h> #include <conio.h> void input(int a[5]) { int i; for (i = 0; i < 5; i++) scanf("%d", &a[i]); } void output(int a[5]) { int i; for (i = 0; i < 5; i++) { printf("%d ", a[i]); } } int main() { clrscr(); int a[5]; printf("Print 5 elem mass: "); input(a); printf("Printed mass: "); output(a); getch(); return 0; }