long int num; int i = 0; printf("Enter An Integer: "); scanf("%ld", &num); while(num != 0){ i+= (num % 10)/7; num /= 10; } printf("The Number Of Sevens In This Integer Is: %d", i);