الرجوع
تسجيل الدخول

If the input is 12, what is the final value for numItems?

int x ;
int numItems = 12;
x = scnr.nextInt();

 if (x == 12) 
  numItems = 100; 

if (x >= 12) 
  numItems = 200; 

numItems = numItems + 1;