Yasir a techie working in a military camp was checking the landmine as per their sequence of numbers.Whatever the number the major gives yasir has to : Check if (number < 0), then need to print as negative. Check if(number > 0), then need to print as positive. But Major Simon imposes a strict constraint that he should use If else concept to complete the task. Since he doesn't know the if else concept he is frustrated. Can you help him to complete his task?
#include <stdio.h>
int main()
{int number;
scanf("%d",&number);
if(number<0){ printf("NEGATIVE");}
else{printf("POSITIVE");}
return 0;}
Comments
Post a Comment