diff --git a/Array.c b/Array.c new file mode 100644 index 0000000..41eac39 --- /dev/null +++ b/Array.c @@ -0,0 +1,23 @@ +// WAP to print out an array of dynamic values. + +void main() { + int r,n,i,a[10]; + + // To set range of array: + printf("\n Enter the range of array: \n"); + scanf("%d", &n); + + // To get values of array: + printf("\n Enter the elements of the array: \n"); + r = 0; + for (i=0 ; i<=n; i++) { + scanf("%d", &a[i]); + } + + // To print the elements of the array: + printf("\n The elements of the array are: \n"); + for (i=0 ; i<=n; i++) { + r++; + printf("\n a[%d] = %d \n", r, a[i]); + } +} \ No newline at end of file diff --git a/Array.exe b/Array.exe new file mode 100644 index 0000000..3bf9c18 Binary files /dev/null and b/Array.exe differ diff --git a/Order Of Programs.md b/Order Of Programs.md index 145b1a4..8898677 100644 --- a/Order Of Programs.md +++ b/Order Of Programs.md @@ -23,4 +23,5 @@ |21 | Triangle.c | Triangle.exe | WAP to check whether a triangle can be formed by the given value for the angles | |22 | Calculator.c | Calculator.exe | Write a menu driven program for calculator | |23 | MultiplicationTable.c | MultiplicationTable.exe | WAP to print the multiplication table for a given number | -|24 | Divisible.c | Divisible.exe | WAP to find an addition of numbers which are >30, <100 & divisible by 7 | \ No newline at end of file +|24 | Divisible.c | Divisible.exe | WAP to find an addition of numbers which are >30, <100 & divisible by 7 | +|25 | Array.c | Array.exe | WAP to print out an array of dynamic values | \ No newline at end of file