I have a question: I’m supposed to build a program where when I enter an integer below a hundred, all numbers smaller than said integer and containing the digit “3″ appear on the screen (etc, if I enter 14, the numbers “3, 13″ should appear).
However, there’s something wrong with my code, please help! Thank you!
The code:
#include <stdio.h>
int main(int argc, const char * argv [])
{
int wholenumber;
printf("百以内の整数を入力してください\n");
scanf_s("%d", &wholenumber);
while(0 <wholenumber)
{
wholenumber--;
while(0 < wholenumber){
wholenumber = 3 %10;
wholenumber = 3 /10;
if (wholenumber == 3);
{printf("%3d",wholenumber);}
}
}
return 0;
}