Skip to content

Instantly share code, notes, and snippets.

@imranhoshain
Created September 6, 2022 14:57
Show Gist options
  • Save imranhoshain/6ed60ac491427de40c136c07039aac2a to your computer and use it in GitHub Desktop.
Save imranhoshain/6ed60ac491427de40c136c07039aac2a to your computer and use it in GitHub Desktop.
#include<stdio.h>
int main(){
int n;
printf("How many number to find: ");
scanf("%d", &n);
int i, a[n];
for(i=0;i<=(n-1);i++)
scanf("%d", &a[i]);
int b[n/2],c[n/2];
for(i=0;i<=(n/2-1);i++)
b[i]=a[i];
printf("\n%d Is Middle Number",a[i]);
int j=0;
for(i=n/2;i<=(n-1);i++){
c[j]=a[i];
j++;}
printf("\n%d Is Middle Index",j);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment