View Code of Problem 68

#include<stdio.h>
void main(){
	int a,b,c;
  	scanf("%d%d%d",&a,&b,&c);
  if(a>b){
    if(a>c){
      printf("%d",a);
  	}
    else printf("%d",&c);
  }
  else
    if(b>c){
      prinft("%d",b);
    }
    else printf("%d",c);
}
/*
Main.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main(){
      ^~~~
Main.c: In function 'main':
Main.c:9:19: warning: format '%d' expects argument of type 'int', but argument 2 has type 'int *' [-Wformat=]
     else printf("%d",&c);
                  ~^  ~~
                  %ls
Main.c:13:7: warning: implicit declaration of function 'prinft'; did you mean 'printf'? [-Wimplicit-function-declaration]
       prinft("%d",b);
       ^~~~~~
       printf
/usr/bin/ld: /tmp/ccpFDZhc.o: in function `main':
Main.c:(.text.startup+0x72): undefined reference to `prinft'
collect2: error: ld returned 1 exit status
*/

Double click to view unformatted code.


Back to problem 68