Computer Science, asked by Nabhonil1382, 1 year ago

Per the calendar, the new year of the new millennium (jan1st 2000) began on a saturday. taking any year as input , write a program to display which day of the week shall the new year fall on

Answers

Answered by Anonymous
0
here we go,

in the programming just replace the year by 2000
Answered by skyfall63
4

The program is:

#include <stdio.h>

#include <conio.h>

Void main ()

{

Long int nd, ld, td, fd, year:

Clrscr ():

Printf(“enter the year”);

Sacnf (“%ld”,&year);

nd= (year-1)*365;

ld= (year-1)/4-(year-1)/100+(year-1)/400;

td= nd + ld;

fd= td%7;

if (fd ==o)

printf(“\n Monday”);

if (fd ==1)

printf (“\n Tuesday”);

if (fd ==2)

printf (“\n Wednesday”);

if (fd ==3)

printf (“\n Thursday”);

if (fd==4)

printf (“\n Friday”);

if (fd==5)

printf (“\n Saturday”);

if (fd==6)

printf (“\n Sunday”);

getch ();

}

Similar questions