This commit is contained in:
2021-04-27 13:05:20 +05:30
parent 1a134890b0
commit 9efbd42b29
3 changed files with 25 additions and 1 deletions

23
Array.c Normal file
View File

@@ -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]);
}
}

BIN
Array.exe Normal file

Binary file not shown.

View File

@@ -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 |
|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 |