Skip to content

Instantly share code, notes, and snippets.

@achmadweb
Created September 17, 2020 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achmadweb/4e46a4c7263754b87ac18b0ce45bd509 to your computer and use it in GitHub Desktop.
Save achmadweb/4e46a4c7263754b87ac18b0ce45bd509 to your computer and use it in GitHub Desktop.
Maximum-Minimum
#include<stdio.h>
int main()
{
int i;
int Tab[10]={ 1, 50, 6, 200, 3, 300, 100, 30, 8, 99 };
int max;
max = Tab[0];
for (i=1;i<10; i++){
if (Tab[i]>max) {
max=Tab[i];
}
}
printf ("Nilai Max= %d", max);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment