Home>

When I run the program below, I think I'm running int Olympic in the main function, but only the printf and scanf parts in the main function are executed. Can you tell me what's wrong?

#include<stdio.h>
int Olympic (int Ad);

int main (void)
{
    int Ad;
     printf ("Please enter the year \ n");
     scanf ("% d",&Ad);
     int Olympic (int Ad);

    return 0;
}

int Olympic (int Ad)
{


    if ((Ad% 4 == 0)&&(Ad>= 1896)) {
     printf ("The year of the Summer Olympics \ n");

     }

    if ((Ad% 4 == 2)&&(Ad>= 1896)) {
      printf ("Winter Olympic year. \ n");
    }
    if (Ad% 2 == 1) {
      printf ("Not the Olympic year \ n");
    }

    return 0;
}
c