View Code of Problem 69

#include<stdio.h>
int main(void)
{
  int x;
  if (x<1)
    x=x;
  else if(x>=1,x<10)
    x=2x-1;
  else
    x=3x-11;
    return 0;
    
  
}
/*
Main.c: In function 'main':
Main.c:7:15: warning: left-hand operand of comma expression has no effect [-Wunused-value]
   else if(x>=1,x<10)
               ^
Main.c:8:7: error: invalid suffix "x" on integer constant
     x=2x-1;
       ^
Main.c:10:7: error: invalid suffix "x" on integer constant
     x=3x-11;
       ^
*/

Double click to view unformatted code.


Back to problem 69