Can someone please explain what really goes on in this code ? If I put the AND statement, the message wont show if values are less than 0 or greater than 10 ... I think I must use 1 0 logic to work this out right ? I just need someone to briefly explain it please.
#include<stdio.h>
main(){
puts("enter number");
scanf("%d",num);
if(num<0 || num >10)
puts("yay");
}
The How is that FI statement different when and is made:
#include<stdio.h>
main(){
puts("enter number");
scanf("%d",num);
if(num<0 && num >10)
puts("yay");
}
感谢!