This question already has an answer here:
- C skipping one command of a function? 2 answers
As the title says, and I can't figure out why this is happening. It's probably something obvious, too.
void main()
{
char input = 0;
int i = 0, num1 = 0, num2 = 0;
for (i = 0; i <= 9; i++) {
scanf_s("%c", &input);
if (input >= 'a')
{
num1++;
}
else if (input == 'H')
{
num2++;
}
}
printf("%d lowercase, %d \"H\".", br1, br2);
}
Aucun commentaire:
Enregistrer un commentaire