Created
September 17, 2020 07:02
-
-
Save achmadweb/4e46a4c7263754b87ac18b0ce45bd509 to your computer and use it in GitHub Desktop.
Maximum-Minimum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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