Skip to content

Instantly share code, notes, and snippets.

@imranhoshain
Created September 6, 2022 14:55
Show Gist options
  • Save imranhoshain/ae9254cc891376a4b69047bc53595d2a to your computer and use it in GitHub Desktop.
Save imranhoshain/ae9254cc891376a4b69047bc53595d2a to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(){
int n;
printf("Type your count number I found maximum number: ");
scanf("%d", &n);
int a[n];
int i;
for(i=0; i<=(n-1); i++){
scanf("%d", &a[i]);
}
int max;
max = a[0];
for(i=1; i<=(n-1); i++){
if (a[i] > max)
max = a[i];
}
printf("Your Maximum Number Is: %d", max);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment