View Code of Problem 87

#include<stdio.h>
int main(){
    int a;
  scanf("%d",&a);
  int min,max;
  if(a%2!=0)
    printf("0 0\n");
  else{
      min=a/4+a%4/2;
    max=a/2;
    printf("%d %d\n",min max);
  }
}
/*
Main.c: In function 'main':
Main.c:11:25: error: expected ')' before 'max'
     printf("%d %d\n",min max);
                         ^~~~
                         )
Main.c:11:17: warning: format '%d' expects a matching 'int' argument [-Wformat=]
     printf("%d %d\n",min max);
                ~^
Main.c:5:11: warning: variable 'max' set but not used [-Wunused-but-set-variable]
   int min,max;
           ^~~
*/

Double click to view unformatted code.


Back to problem 87