Hi iam new to c programming i have this program that suppose to: A program that will ask for two number (minimum and maximum) and print at all the even numbers in between
but iam stuck i want to combine the min and max so i can print all the even numbers in between.
any help will be apprecited, thanks
Code:
// A program that will ask for two number (minimum and maximum) and print at all the even numbers in between
#include<stdio.h>
int main(void)
{
int min, max, i;
printf("Please enter a minimum number: ");
scanf("%d", &min);
printf("Please enter a maximum number: ");
scanf("%d", &max);
i = min +1; // iam incrementing i
while ( i % 2); // to get even numbers
printf("%d", i); // result
return (0);
}