foo.c: In function 'main':
foo.c:9:6: error: 'm' undeclared (first use in this function)
   if(m==2){
      ^
foo.c:9:6: note: each undeclared identifier is reported only once for each function it appears in
foo.c:10:7: error: expected ';' before ':' token
    z++:
       ^
foo.c:14:7: error: expected ';' before ':' token
    z++:
       ^
foo.c:18:7: error: expected ';' before ':' token
    z++:
       ^
foo.c:22:7: error: expected ';' before ':' token
    z++:
       ^
foo.c:26:7: error: expected ';' before ':' token
    z++:
       ^
foo.c:29:16: error: 'i' undeclared (first use in this function)
   printf("%d", i);
                ^
foo.c:5:8: warning: variable 'y' set but not used [-Wunused-but-set-variable]
  int x,y,z,l,r=0;
        ^
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d",&l,&r);
  ^~~~~~~~~~~~~~~~~~~~
   
  
    [Hydro](https://hydro.ac)提供评测服务