Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- int array [100];
- int maxi_index,j;
- scanf("%d",&maxi_index);
- array [maxi_index];
- for (j=0;j<maxi_index;j++)
- scanf("%d",&array [j]);
- int read_value,read_index;
- // printf("Give value : ");
- // scanf("%d",&read_value);
- printf("Give the index number : ");
- scanf("%d",&read_index);
- if (read_index>=maxi_index)
- {
- maxi_index--;
- }
- else
- {
- for (j=read_index;j<maxi_index;j++)
- {
- array[j-1]=array[j];
- }
- maxi_index--;
- }
- for (j=0;j<maxi_index;j++)
- printf("%d ",array[j]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement