I submitted two solutions for the elevators and stairs problem,the first one which gives wrong answer and the another one which gives correct answer.please help me find out what is the difference between the two.
Order of scanf statements is different
scanf("%d",&n);
scanf("%d",&V1);
scanf("%d",&V2);
Also one solution prints new lines while the other doesn’t
if(s<e){printf("Stairs");}
else {printf("Elevator");}
Print a answer on new line.
does order of scanf and new lines for answer matter?
I changed the scanf order but still it is giving wrong answer
tried it.but no use