CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include<simplecpp>
main_program{
	int x,y,d,w,m;
	cin>>y>>d;
	w=1;
	x=d;
	cout<<"Month 1:";
	repeat(31-x){
		d=d+1;
		w=w+1;
		if(w==7){
			cout<<d<<" ";
			w=0;
		}
	}
	d=0;
	cout<<endl;
	cout<<"Month 2:";
	if(y%4==0);
	while(d<=29){
		d=d+1;
		w=w+1;
		if (w==7){
			cout<<d<<" ";
			w=0;
		}
	}
	if(y%4!=0){
		while(d<=28){
			d++;
			w++;
			if(w==7){
				cout<<d<<" ";
			       w=0;	
			}
		}
}
m=3;
while(m<=12){
	d=1;
//f(m==3)
//d=2;
//f (m==4);
//=0;
cout<<endl<<"Month "<<m<<":";
if(m==3||m==5||m==7||m==8||m==10||m==12){
	while(d<=31){
		if(w==7){
			cout<<d<<" ";
			w=0;
		}
		d++;
		w++;
	}
}
	if(m==4||m==6||m==9||m==11){
		while(d<30){
			if(w==7){
				cout<<d<<" ";
				w=0;
			}
			d++;
			w++;

		}
	}
	m++;

}
}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: C
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#inlcude<simplecpp>
main_program{
	int N,d;
	cin >> N >>d;
	// for checking leap year
	if((N%4==0 && N%100 !=0) || (N%400 == 0)){
		
	}
	switch(command){
case1: 
case2:// for checking leap year
        if((N%4==0 && N%100 !=0) || (N%400 == 0)){
        month2 has 29 days        
        }











	cout << "Month 1:"<< 8-d<<" "<<15-d<<" "<<22-d<<" "<<29-d;<<endl;
	cout << "Month 2:"<< 5-d<<" "<<12-d<<" "<<19-d<<" "<<25-d;<<endl;
	cout << "Month 3:"<< 4-d<<" "<<12-d<<" "<<19-d<<" "<<26-d;<<endl;
	cout << "Month 4:"<< 8-d<<" "<<15-d<<" "<<22-d<<" "<<29-d;<<endl;
	cout << "Month 5:"<< 6-d<<" "<<13-d<<" "<<20-d<<" "<<27-d;<<endl;
	cout << "Month 6:"<< 3-d<<" "<<10-d<<" "<<17-d<<" "<<29-d;<<endl;
	cout << "Month 7:"<< 8-d<<" "<<15-d<<" "<<22-d<<" "<<29-d;<<endl;
	cout << "Month 8:"<< 8-d<<" "<<15-d<<" "<<22-d<<" "<<29-d;<<endl;
	cout << "Month 9:"<< 8-d<<" "<<15-d<<" "<<22-d<<" "<<29-d;<<endl;
	cout << "Month 10:"<< 8-d<<" "<<15-d<<" "<<22-d<<" "<<29-d;<<endl;
	cout << "Month 11:"<< 8-d<<" "<<15-d<<" "<<22-d<<" "<<29-d;<<endl;
	cout << "Month 12:"<< 8-d<<" "<<15-d<<" "<<22-d<<" "<<29-d;<<endl;
}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: D
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include<simplecpp>
main_program{
int N,d;
cin>>N>>>d;
int r;
int i;
if((N%4==0)&&(N%400==0)&&(N%100==0)){
	i==1;
}
else if((N%4==0)&&(N%100!=0)){
	i==1;
}
else{
	i==0;
}

if(d==1){
	r=6;
}
if(d==2){
	r=5;
}
if(d==3){
	r=4;
}
if(d==4){
	r=3;
}
if(d==5){
	r=2;
}
if(d=6){
	r=1;
}
if(d==7){
	r=0;
}
int s=7;
if((i==0)&&(d==1)){
cout<<"Month 1:"<<"7"<<"14"<<"21"<<"28"<<endl;
cout<<"Month 2:"<<"4"<<"11"<<"18"<<
cout<<"Month 3:"<<"4"<<"11"<<"18"<<
cout<<"Month 4:"<<"1"<<"8"<<"22"<<
cout<<"Month 5:"<<"6"<<"13"<<"20"
cout<<"Month 6:"<<"3"<<"10"<<"17"
cout<<"Month 7:"<<"1"<<"8"<<"22"
cout<<"Month 8:"<<"5"<<"12"<<"19"
cout<<"Month 9:"<<"2"<<"9"<<"23"
cout<<"Month 10:"<<"7"<<"14"<<"21"
cout<<"Month 11:"<<"4"<<"11"<<"18"
cout<<"Month 12:"<<"2"<<"9"<<"16"



}




}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: D
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include<simplecpp>
main_program{
int year,d;
cin>>year>>d;

array[]={0,31,28,31,30,31,30,31,31,30,31,30,31};

if((year%4==0) && (year%100 !=0) ||(year%400 ==0) {
cout<<""
}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: D
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include<simplecpp>
main_program{
	int N,d;
	cin>>N>>d;
	if(N%100==0){
		if(N%400==0){
			cout<<"Month 1:"<<" ";
			int x=d;
			while(x<=31){
				cout<<d<<" ";
				x=x+7;
				cout<<x<<" ";
			}
			x=d;
			cout<<"Month 2:"<<" ";
		        while(x<=29){
				cout<<d<<" ";
				x=x+7;
				cout<<x<<" ";
			}
                        x=d;int i=3;
			repeat(10){
                        while(x<=30){
			cout<<"Month "<<i<<":"<<" ";
			cout<<d<<" ";
			x=x+7;
			cout<<x<<" ";
			i++;
			}
		}}}}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: C
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include<simplecpp>
main_program{
	int N,d,k=0,e=0;
	cin>>N>>d;
	while(d>7){
		d-=7;
	}
		cout<<"Month 1: ";
	for(int i=8-d;i<=31;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 2: ";
	if(N%4==0){
		if(N%100==0){
			if(N%400==0)
				e=29;
			else
				e=28;
		}
		else
			e=29;
	}
	else e=28;
	for(int i=7-(31-k);i<=e;i+=7){
		cout<<i<<" ";
		k=i;
	}
	
	cout<<"\n"<<"Month 3: ";
	for(int i=7-(e-k);i<=31;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 4: ";
	for(int i=7-(31-k);i<=30;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 5: ";
	for(int i=7-(30-k);i<=31;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 6: ";
	for(int i=7-(31-k);i<=30;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 7: ";
	for(int i=7-(30-k);i<=31;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 8: ";
	for(int i=7-(31-k);i<=31;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 9: ";
	for(int i=7-(31-k);i<=30;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 10: ";
	for(int i=7-(30-k);i<=31;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 11: ";
	for(int i=7-(31-k);i<=30;i+=7){
		cout<<i<<" ";
		k=i;
	}
	cout<<"\n"<<"Month 12: ";
	for(int i=7-(30-k);i<=31;i+=7){
		cout<<i<<" ";
		k=i;
	}
}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: A
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include <simplecpp>
main_program{

	int y,d;
	int m=1;
	int t;
	cin>>y>>d;
	int i=8-d;

	if((y%4==0 && y%100!=0) || (y%4== 0 && y%400==0))
	{
		repeat(12)
		{
			if(m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12)
			{
				t=31;
			}
			else if( m==4 || m==6 || m==9 || m==11)
			{
				t=30;
			}
			else if( m==2)
			{
				t=29;
			}
			cout<<"Month "<<m<<": ";
			while(i<=t)
			{
				cout<<i<<" ";
				i=i+7;
			}
			cout<<endl;
			m++;
			i=7-(t-i+7);
		

		
		}
	}
	else
	{
		repeat(12)
                {
                        if(m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12)
                        {
                                t=31;
                        }
                        else if( m==4 || m==6 || m==9 || m==11)
                        {
                                t=30;
                        }
                        else if( m==2)
                        {
                                t=28;
                        }
			cout<<"Month "<<m<<": ";
                        while(i<=t)
                        {
                                cout<<i<<" ";
                                i=i+7;
                        }
                        cout<<endl;
                        m++;
                        i=7-(t-i+7);
		}


	}

}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: A
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include<simplecpp>


main_program{

	int N , d ;

	cin >> N , d ;

	while( i <= 31){
         cout << "Month 1 :" ; 
	   i+=7 ;
	   cout << i << " " ;
	}

	while((i > 31 )&&(j <= a) ){
		j = i - 31 ;
		cout << "Month 2 :" ;
	       j+=7 ;
               cout << j << " ";
	}

	while ((j > a )&&(k <= 31)){

		k = j - a ;
		cout << "Month 3 :" ;
		 k+= 7;
		 cout << k << " " ;
	}
	while((k>31)&&(l <= 30){
			l = k - 31 ;

			cout << "Month 4 :" ;
			l +=7
			cout << l << " " ; 
			}

	while((l>30)&&(m<= 31 ){
		 m = l -30 ;

		 cout << "Month 5 :" ;
		 m +=7 
		 cout << m << " ";
		 }
	while((m>31)&&(n<30)){
	 n = m - 31 ;
	 cout << "Month 6 :" ;
	 n += 30 ;
	 cout << n << " " ;
	 }

	 while((n>30)&&(o < 31)){
	  o = n - 30 ;
	  cout << "Month 7: " ;
	  o += 7 ;
	 cout  << o << " " ;
	 }

	while((o>31)&&(p< 31)){
	       p = o - 31 ;
       cout << "Month 8: " ;
       o +=7 ;
 cout << o << " ";
	}
       while((p>31)&&(q< 30)){
       q = p - 30 ;
      cout << "Month 9: " ;
      q+=7 ;
      cout << q << " " ;
       }
       while((q>

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: D
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include<simplecpp>
main_program{
	int N,d,febday,sunday,maxday;
	cin>>N>>d;
	sunday=8-d;
	if(N%4!=0)
	
		febday=28;
	if(N%400!=0)
		febday=28;
	else
		febday=29;

	for(int i=1;i<=12;i++)
	{
		if(i==1)
                        maxday=31;
                else if(i==2)
                        maxday=febday;
                else if(i==3)
                        maxday=31;
                else if(i==4)
                        maxday=30;
                else if(i==5)
                        maxday=31;
                else if(i==6)
                        maxday=30;
                else if(i==7)
                        maxday=31;
                else if(i==8)
                        maxday=31;
                else if(i==9)
                        maxday=30;
                else if (i==10)
                        maxday=31;
                else if (i==11)
                        maxday=30;
                else
                        maxday=31;

		cout<<"Month "<<i<<":";
		while(sunday<=maxday)
                         {
                	        cout<<" "<<sunday;
                        	sunday= sunday+7;
                          }
		cout<<"\n";
		sunday=sunday-maxday;
				
	}
}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: A
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include<simplecpp>
main_program
{
	int N,d;
	cin>>N>>d;
	int j = 1+(7-d);
	if(N%4 == 0 || N%400 == 0)
	{
		if(N%4 != 0 && N%100 == 0) 
		{
			cout<<""<<endl;
		}
		else
		{
			for(int i=1;i<=12;i++)
			{
			 
				cout<<"Month "<<i<<":";
				
				if(i==2)
				{
					while(j<=29)
					{
						cout<<j<<" ";
						j = j+7;
					}
					cout<<endl;
				}
				if(i == 1||i==3||i==5||i==7||i==8||i==10||i==12)
				{
					while(j<=31)
					{
						cout<<j<<" ";
						j = j+7;
					}
					cout<<endl;
				}
				else
				{
					while(j<=30)
					{
						cout<<j<<" ";
					}
					cout<<endl;
				}
			}
		}
	}
	else
	{
		for(int i=1;i<=12;i++)
		{
		
			cout<<"Month "<<i<<":";
			if(i==2)
			{
				while(j<=28)
				{
					cout<<j<<" ";
					j = j+7;
				}
				cout<<endl;
			}
			if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
			{
				while(j<=31)
				{
					cout<<j<<" ";
					j = j+7;
				}
				cout<<endl;
			}
			else
			{
				while(j<=30)
				{
					cout<<j<<" ";
				}
				cout<<endl;
			}
		}
	}
}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: C
Problem: Write a C++ program to take two inputs from the user, the year N, and d, the day of the week that January 1st falls on. Assume that the days are encoded as follows: (Mon: 1, Tues: 2, Wed: 3,   Sun: 7). Based on this, print all the dates on which Sunday falls on in that year.You must also take into account if the year is a leap year or not. The year is said to be a leap year if the year is divisible by four, except for end-of-century years where the year should be divisible by 400.

Example:Let s say you were interested in finding out all the dates when Sunday is going to be this year i.e. 2024, then the input to your code should be:2024 1Explanation for the above input: 2024 is the year and 1st Jan happened to be on Monday this year, hence was number-encoded as 1The output should list the dates of all Sundays in the year N, month-wise on a new line.

Constraints (Assume)1000 <= N (Year) <= 35001 <= d <= 12

Student submission:
#include <simplecpp>
main_program{
	int N,d,c;
	cin >> N >> d;
	c = 8-d;
	while(d<31){cout << "month1:" ;
	d = d + c;
	cout << d;}
}

Grading criterion: Sunday Date Calculation (ASSUMING Leap year calculation is correct)
Rating A: Code correct for Leap and Non leap yeat
Rating B: Code almost correct for Leap and Non leap year, some small mistake
Rating C: Code mostly incorrect,some attempt made in the right direction
Rating D: No code or completely wrong code
Assigned grade: D