c program to print odd numbers between specified ranges recursion
#include <stdio.h>
int printodd(int first,int end){
int i=first;
if(i<=end){
if(i%2!=0)
printf("%d\t",i);
i++;
printodd(i,end);
}
}
int main()
{
int first,last;
printf("please enter the first number in the range:");
scanf("%d",&first);
printf("please enter the last number in the range:");
scanf("%d",&last);
int odd=printodd(first,last);
printf("%d",odd);
return 0;
}