# Impossible ! (H.E.L.P)

This is a discussion on Impossible ! (H.E.L.P) within the C Programming forums, part of the General Programming Boards category; im trying to make this.. Code: #include<stdio.h> int main() { int Year; int FirstDay; int Month; int Leap_Year; int Normal_Year; ...

1. ## Impossible ! (H.E.L.P)

im trying to make this..

Code:
```#include<stdio.h>
int main()
{
int Year;
int FirstDay;
int Month;
int Leap_Year;
int Normal_Year;
int weekday;
int startday;
int daycount;
int days;

printf("Input Year:");
scanf("%d", &Year);
printf("Input first day of the year as a number:");
scanf("%d", &FirstDay);
printf("Input Month to Display:");
scanf("%d", &Month);

Normal_Year = (((Year-1)*365) + (Year-1/4) - (Year-1/100) + (Year-1/400) + 1)%7;
Leap_Year = ((Year-1)*365 + (Year-1/4) - (Year-1/100) + (Year-1/400))%7;

if (Month=1)
printf("January %d", Year);
else if (Month=2)
printf("February %d", Year);
else if (Month=3)
printf("March %d", Year);
else if (Month=4)
printf("April %d", Year);
else if (Month=5)
printf("May %d", Year);
else if (Month=6)
printf("June %d",Year);
else if (Month=7)
printf("July %d", Year);
else if (Month=8)
printf("August %d", Year);
else if (Month=9)
printf("September %d", Year);
else if (Month=10)
printf("October %d", Year);
else if (Month=11)
printf("November %d", Year);
else if (Month=12)
printf("December %d", Year);
else
printf("PAmay may!");

printf("\nResults:\n");
printf("\nSun\tMon\tTue\tWed\tThu\tFri\tSat\n");
printf("\n---\t---\t---\t---\t---\t---\t---\n");

for (weekday = 0; weekday <= startday; weekday++)
printf(" ");
if(Month==1 || Month==3 || Month==5 || Month==7 || Month==8 || Month==10 || Month==12)
days=31;
else if(Month==4 || Month==6 || Month==9 || Month==11)
days=30;
else if((Year%100!=0 && Year%4==0) || Year%400==0)
days=29;
else
days=28;

for    (daycount = 1; daycount <= days; daycount++)
{
if(weekday > 6)
{
printf("\n");
weekday = 1;
}

else
weekday++;
printf("%3d", daycount);
return 0;
}
}```
tell me what is wrong O_O

2. Well for one thing check your if else statements.... You need to use == NOT =

3. Please work it the other way around - you tell US what's wrong with the program, and we'll try to help you fix it. You obviously KNOW what's wrong, because you had to test it out.

So share - it really helps quickly focus everyone, on the same problem.