We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3d44d19 + c746c5f commit 8857f8cCopy full SHA for 8857f8c
1 file changed
Array in small
@@ -0,0 +1,24 @@
1
+
2
+/ Program to take 5 values from the user and store them in an array
3
+// Print the elements stored in the array
4
+#include <stdio.h>
5
6
+int main() {
7
+ int values[5];
8
9
+ printf("Enter 5 integers:\n");
10
11
+ // taking input and storing it in an array
12
+ for(int i = 0; i < 5; ++i) {
13
+ scanf("%d", &values[i]);
14
15
+ }
16
17
+ printf("Displaying integers:\n");
18
19
+ // printing elements of an array
20
21
+ printf("%d\n", values[i]);
22
23
+ return 0;
24
+}
0 commit comments