2
My variables are :
int codigo; --> Sendo esta variável para o switch
int numero1,numero2,numero3;
User will enter with three variables :
printf("Digite o primeiro numero inteiro: ");
scanf("%d", &numero1);
printf("Digite o segundo numero inteiro: ");
scanf("%d",&numero2);
printf("Digite o terceiro numero inteiro: ");
scanf ("%d", &numero3);
After this, I need to make the program check on each variable, what are its even and odd numbers.
For example, the user in the first variable called numero1 type the número 20, with this, the program will have to travel until it reaches the número 20 and show which numbers were even and odd.
Then the user type in the variable numero2, the número 19, and again will make the previous check.
Finally, the user type in the variable numero3, the número 30 and again the same check.
I’m using a switch because the user will have other options too. But how can I do it then ? Using a for along with a do-while until you can pick up all the numbers and check which ones are even and odd ?
Thanks for the code, it worked, I only modified your answer because the method was inside the main, causing that error.
– Mondial