Name: Anonymous 2010-07-13 18:06
Make me a C program that reads given two integers (no limits) and outputs the largest.
Do this in a properGNU hello.c way.
Do this in a proper
#include <stdio.h>
int ab(char *a, char *b) {
while(*a!='\0'&&*a==*b&&*a++&&*b++); return *a-*b;
}
int main(int ac, char **a) {
int c = ac<3?0:ab(a[1], a[2]);
printf("%s\n",ac<3?"the fuck?!":c>0?a[1]:a[2]);
//printf("%s\n",ac<3?"fuck off":c>0?"1st greater":c<0?"2nd greater":"equal");
return 0;
}
while(*a!='\0'&&*a==*b&&*a++&&*b++); return *a-*b;while(*a!='\0'&&*b!='\0'&&*a==*b&&*a++&&*b++); return *a!='\0'&&*b!='\0'?*a-*b:*a=='\0'&&*b=='\0'?0:*a=='\0'?-1:1;