Trial for box

ven numbers in the given range(between upper limit to lower limit)
#include <stdio.h>
#include <stdlib.h>
void displayEvenOdd(int num, int limit);
int main()
{
int lowerLimit, upperLimit;
printf("Enter lower limit\n");
scanf("%d",&lowerLimit);
//Received from user number for lower limit
printf("Enter upper limit\n");
scanf("%d",&upperLimit);
//Received from user number for upper limitr
printf("Even/odd numbers from %d to %d are: ",lowerLimit,upperLimit);
displayEvenOdd(lowerLimit,upperLimit);
getch();
return 0;
}
void displayEvenOdd(int num, int limit)//recursive function
{
if(num>limit)
return;
printf("%d, ",num);
displayEvenOdd(num + 2, limit);
}
When the above code is

একটি মন্তব্য পোস্ট করুন