Write the algorithm and program in C

Deleting an element of an array

Algorithm:

1. Start
2. Initialize the array with elements
3. Display the original array
4. Input the element to be deleted
5. Find the position of the element in the array
6. If position is found
a. Shift all the elements after the position one place to the left
b. Decrease the size of the array by 1
7. Display the new array after deletion
8. Stop

Program:
```c
#include <stdio.h>

int main() {
int array[100], position, size, i;

// Input the size of the array
printf("Enter the size of the array: ");
scanf("%d", &size);

// Input the elements of the array
printf("Enter the elements of the array:\n");
for (i = 0; i < size; i++) {
scanf("%d", &array[i]);
}

// Display the original array
printf("Original array: ");
for (i = 0; i < size; i++) {
printf("%d ", array[i]);
}
printf("\n");

// Input the element to be deleted
printf("Enter the element to be deleted: ");
int element;
scanf("%d", &element);

// Find the position of the element in the array
for (i = 0; i < size; i++) {
if (array[i] == element) {
position = i;
break;
}
}

// If position is found
if (i < size) {
// Shift all the elements after the position one place to the left
for (i = position; i < size - 1; i++) {
array[i] = array[i+1];
}
// Decrease the size of the array by 1
size--;

// Display the new array after deletion
printf("Array after deletion: ");
for (i = 0; i < size; i++) {
printf("%d ", array[i]);
}
printf("\n");
} else {
printf("Element not found in the array.\n");
}

return 0;
}
```