hi.. I'm just starting to learn C language... pls help me with this code. When I input either 5 or 6 or 7, it doesnt print the right output... could some help me .pls
Code:#include <stdio.h> void main() { int a; printf("enter an integer from 1 to 10: \n"); scanf("%d", a); if (a > 4 && a < 8) { printf("The number is either 5, 6 or 7"); } else if (a <= 2 || a >= 9 ) { printf("The number is either 1,2,9 or 10"); } else { printf("The number is 3, 4, or 8"); } }