1- i want to write a function that can return for me 1 if the number is odd and returns 0 otherwise.
2- how i can call this function to know if this number entered is even or odd.
I started with this code can anybody help me please:
#include <stdio.h>
int isOdd (int x);
int main (void)
{
int x=0;
printf("Enter a positive number:");
scanf("%d",&x);
return 0;
}

New Topic/Question
Reply




MultiQuote






|