#include<stdio.h> int main() { int max(); extern int a,b,c; printf("please enter three integer numbers:"); scanf("%d,%d,%d",&a,&b,&c); printf("max is %d", max()); system("pause"); } int a,b,c; int max() { int m; m=a>b?a:b; if(c>m) m=c; return (m); } |
#include<stdio.h> int main() { int max(); extern int a,b,c; printf("please enter three integer numbers:"); scanf("%d,%d,%d",&a,&b,&c); printf("max is %d", max()); system("pause"); } int a,b,c; int max() { int m; m=a>b?a:b; if(c>m) m=c; return (m); } |