Skip to content

Instantly share code, notes, and snippets.

@roktas
Last active August 29, 2015 13:57
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 roktas/9784706 to your computer and use it in GitHub Desktop.
Save roktas/9784706 to your computer and use it in GitHub Desktop.

Bu program iki sayının büyüğünü görüntüler. Denemek için:

$ make
$ ./max 19 27
#include <stdlib.h>
#include <stdio.h>
#include "max.h"
int main(int argc, char *argv[])
{
int result;
int a, b;
if (argc != 3) {
fprintf(stderr, "kullanim: max <sayi1> <sayi2>\n");
exit(1);
}
a = atoi(argv[1]);
b = atoi(argv[2]);
result = maximum_of(a, b);
printf("%d ve %d'nin büyüğü: %d\n", a, b, result);
return 0;
}
int maximum_of(int a, int b)
{
return a >= b ? a : b;
}
int maximum_of(int, int);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment