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 N,d;
cin>>N>>d;
bool leap=false;
if(N%400==0)
	leap=true;
if(N%100!=0 && N%4==0)
	leap=true;
int day=8-d;
for(int i=1;i<=12;i++)
{
	cout<<"Month "<<i<<": ";
	switch(i){
	case 1:
	case 3:
	case 5:
	case 7:
	case 8:
	case 10:
	case 12:
		while(day<32){
		cout<<day<<" ";
		day+=7;
		}
	day-=31;
	break;
	case 2:
	if(leap){
	while(day<30){
		cout<<day<<" ";
		day+=7;
		}
	day-=29;
	}
	else{
	while(day<29){
		cout<<day<<" ";
		day+=7;
		}
	day-=28;
	}
	break;
	case 4:
	case 6:
	case 9:
	case 11:
	while(day<31){
		cout<<day<<" ";
		day+=7;
		}
	day-=30;
	break;
	}
	if(day==0)
		day=7;
	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: 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 a,b,e;
	cin>>a;
	cin>>b;
	if(a%4==0 && a%100!=0){
	int c = 7-b +1;
	int d = c+21;
	int f = c+28;
	cout<<"Month 1: "<<c<<" "<<c+7<<" "<<c+14<<" "<<d<<endl;
	 e = 31-d;
	 c = 7-e ;
	 d = c+21;
	 cout<<"Month 2: "<<c<<" "<<c+7<<" "<<c+14<<" "<<d<<endl;
	 e = 29-d;
         c = 7-e ;
         d = c+21;
         cout<<"Month 3: "<<c<<" "<<c+7<<" "<<c+14<<" "<<d<<" "<<f<<endl;


	}
	else if(a%100==0 && a%400 ==0){
for(int i=1;i<=12;i++){
cout<<"Month"<<i<<" "<<endl;
}

	}

	else{
	for(int i=1;i<=12;i++){
cout<<"Month"<<" "<<i<<":"<<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 year,d,x,Month;
	cin>>year;
	cin>>d;
	if(year%4!=0){
		x=8-d;
		cout<<"Month 1: ";
		while(x<=31){
			cout<<x<<" ";
			x=x+7;
		}

		cout<<"\nMonth 2: ";
		while(x>31 && x<=59){
			cout<<x-31<<" ";
		}
	}

}

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 y,d,s;
	bool leap;
	cin>>y>>d;
	if(y%4==0 && y%400==0)
		leap=true;
	else
		leap=false;
	s=7-(d-1);
	cout<<"Month 1: ";
	while(s<=31)
	{
		cout<<s<<" ";
		s=s+7;
	}
	cout<<endl;
	int r= 38-s;
	cout<<"Month 2: ";
	s=r;

	if(leap)
	{

		while(s<=29)
		{
			cout<<s<<" ";
			s=s+7;
		}
		r=36-s;
	}
	else
	{
		while(s<=28)
		{
			cout<<s<<" ";
		       s=s+7;	
		}
		r=35-s;
	}
	cout<<endl;
	cout<<"Month 3: ";
	s=7-r;
	while(s<=31)
	{
		cout<<s<<" ";
		s=s+7;
	}
	cout<<endl;
	r=38-s;
	s=7-r;
	cout<<"Month 4: ";
	while(s<=30)
	{
		cout<<s<<" ";
		s=s+7;
	}
	cout<<endl;
	r=37-s;
	s=7-r;
	cout<<"Month 5: ";
	while(s<=31)
	{
		cout<<s<<" ";
		s=s+7;
	}
	cout<<endl;
	r=38-s;
	s=7-r;
	cout<<"Month 6: ";
	while(s<=30)
	{ 
		cout<<s<<" " ;
		s=s+7;
	}
	cout<<endl;
	r=37-s;
	s=7-r;
	cout<<"Month 7: ";
	while(s<=31)
	{
		cout<<s<<" ";
		s=s+7;
	}
	cout<<endl;
	r=38-s;
	s=7-r;
	cout<<"Month 8: ";

	while(s<=31)
	{
		cout<<s<<" ";
		s=s+7;
	}
	cout<<endl;
	r=38-s;
	s=7-r;
	cout<<"Month 9: ";
	while(s<=30)
	{
		cout<<s<<" ";
		s=s+7;
	}
	cout<<endl;
	r=37-s;
	s=7-r;
	cout<<"Month 10: ";
	while(s<=31)
	{
		cout<<s<<" ";
		s=s+7;
	}
	cout<<endl;
	r=38-s;
	s=7-r;
	cout<<"Month 11: ";
	while(s<=30)
	{
		cout<<s<<" ";
		s=s+7;
	}
	cout<<endl;
	r=37-s;
	s=7-r;
	cout<<"Month 12: ";
	while(s<=31)
	{
		cout<<s<<" ";
		s=s+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: 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;
	cin>>n>>d;
	int dof=28;
	int k=0;
	if (((n%4==0)&&(n%100!=0))||(n%400==0)) {dof=29;}
	cout<<"Month 1: "; for(int i=8-d;i<32;i=i+7){cout<<i<<" "; k=i;} 
	cout<<endl;
	cout<<"Month 2: "; for(int i=k-24;i<(dof+1);i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 3: "; for(int i=k+7-dof;i<32;i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 4: "; for(int i=k-24;i<(31);i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 5: "; for(int i=k-23;i<32;i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 6: "; for(int i=k-24;i<31;i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 7: "; for(int i=k-23;i<32;i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 8: "; for(int i=k-24;i<32;i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 9: "; for(int i=k-24;i<31;i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 10: "; for(int i=k-23;i<32;i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 11: "; for(int i=k-24;i<31;i=i+7) {cout<<i<<" "; k=i;}
	cout<<endl;
	cout<<"Month 12: "; for(int i=k-23;i<32;i=i+7) {cout<<i<<" "; k=i;}
	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: 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 , i;

	cin>>N>>d;

	if(N%4!=0){
		//month1
		if(d<=6){
			i = 7;

			cout<<"Month 1 : ";
			while(d+i<=31){
				cout<<d+i<<" ";
				i = 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: 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;
	while((N%100==0)&&(N%400==0)){
	if(d==1){cout<<"Month 1:7 14 21 28"<<endl<<"Month 2:4 11 18 25"<<endl<<"Month 3:3 10 17 24 31"<<endl<<"Month 4:7 14 21 28"<<endl<<"Month 5:5 12 19 26"<<endl<<"Month 6:2 9 16 23 30"<<endl<<"Month 7:7 14 21 28"<<endl<<"Month 8:4 11 18 25"<<endl<<"Month 9:1 8 15 22 29"<<endl<<"Month 10:6 13 20 27"<<endl<<"Month 11:3 10 17 24"<<endl<<"Month 12:1 8 15 22 29";}
	if(d==2){cout<<"Month 1:6 13 20 27"<<endl<<"Month 2:3 10 17 24"<<endl<<"Month 3:2 9 16 23 30"<<endl<<"Month 4:6 13 20 27"<<endl<<"Month 5:4 11 18 25"<<endl<<"Month 6:1 8 15 22 29"<<endl<<"Month 7:6 13 20 27"<<endl<<"Month 8:3 10 17 24 31"<<endl<<"Month 9:7 14 21 28"<<endl<<"Month 10:5 12 19 26"<<endl<<"Month 11:2 9 16 23 30"<<endl<<"Month 12:7 14 21 28";}
	if(d==3){cout<<"Month 1:5 12 19 26"<<endl<<"Month 2:2 9 16 23"<<endl<<"Month 3:1 8 15 22 29"<<endl<<"Month 4:5 12 19 26"<<endl<<"Month 5:3 10 17 24 31"<<endl<<"Month 6:7 14 21 28"<<endl<<"Month 7:5 12 19 26"<<endl<<"Month 8:2 9 16 23 30"<<endl<<"Month 9:6 13 20 27"<<endl<<"Month 10:4 11 18 25"<<endl<<"Month 11:1 8 16 22 29"<<endl<<"Month 12:6 13 20 27";}
	if(d==4){cout<<"Month 1:5 12 19 26"<<endl<<"Month 2:1 8 15 22 28"<<endl<<"Month 3:7 14 21 28"<<endl<<"Month 4:4 11 18 25"<<endl<<"Month 5:2 9 16 23 30"<<endl<<"Month 6:6 13 20 27"<<endl<<"Month 7:4 11 18 25"<<endl<<"Month 8:1 8 15 22 29"<<endl<<"Month 9:5 12 19 26"<<endl<<"Month 10:3 10 17 24 31"<<endl<<"Month 11:7 15 21 28"<<endl<<"Month 12:5 12 19 26";}

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 (1000 <= N && N <= 3500 && 1 <= d && d <= 12){
	if ( N % 4 == 0 ){
	        if (d == 1){
			for(int i = 7; i <= 31; i=i+7){
				cout <<"Month 1:"<< i << " ";
		        for(int j = 4; j <= 29; j=j+1){
				cout << "Month 2:"<< j <<" ";
			}
			}
	        
	                  		
			}
	}
	else{

	}
}
}

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;
	int d;
	int sum;
	cin >> N >> d;
	int month1 = 31;
	int month2a = 28;
	int month2b = 29;
	int month3 = 31;
	int month4 = 30;
	int month5 = 31;
	int month6 = 30;
	int month7 = 31;
	int month8 = 31;
	int month9 = 30;
	int month10 = 31;
	int month11 = 30;
	int month12 = 31;
	if(N%4 != 0){
		if(d>= 1 and d <5){
			cout << "Month 1: " << 8-d << " " << 15 - d << " " << 22-d << " " << 29 - d << endl;
		}
		else{
			cout << "Month 1: " << 8-d << " " << 15 - d << " " << 22-d << " " << 29 - d << " " << 36 - d << endl;
		}
		if(d >=1 and d <5){
			cout << "Month 2: " << 2 + d << " " << 9 + d << " " << 16 + d << " " << 23 + d << endl;
		}
		else{
			cout << "Month 2: " << 12 - d << " " << 19 - d << " " << 26 - d << " " << 33 - d << endl;
		}
		if(d=1){
			cout << "Month 3 : " << 2 + d << " " << 9 + d << " " << 16 + d << " " << 23 + d << " " << 30 + d << endl;
		}
		else if(d==2 && d==3 && d == 4){
			cout << "Month 3 : " << 2 + d << " " << 9 + d << " " << 16 + d << " " << 23 + d << endl;
		}
		else{
			cout << "Month 3 : " << 12 - d << " " << 19 - d << " " << 26 - d << " " << 33 - d << endl;
		}
		if(d = 1){
			cout << "Month 4 : " << 6+d << " " << 13 + d << " " << 20+d << " " << 27 + d << endl;
		}
		else if (d==2){
			cout << "Month 4 : " << d << " " << 7 + d << " " << 14 + d << " " << 21 + d << " " << 28 + d << endl;
		}
		else if (d==3 && d == 4){
			cout << "Month 4 : " << d << " " << 7 + d << " " << 14 + d << " " << 21 + d << endl;
		}
		else{
			cout << "Month 4 : " << d << " " << 9 -d << " " << 16 - d << " " << 23 - d << " " << 30 - d << endl;
		}
		if(d = 1){
			cout << "Month 5 : " << 4+d << " " << 11 + d << " " << 18+d << " " << 25 + d << endl;
		}
		else if(d = 2){
			cout << "Month 5 : " << 5 + d << " " << 12 + d << " " << 19 + d << " " << 26 + 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: 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 l,n,d;
cin>>n>>d;
bool isleap=false;
if(n%4==0&&n%100!=0){
isleap=true;
}
if(n%4==0&&n%100==0&&n%400==0){
isleap=true;
}
cout<<"Month 1: ";
for(int i=8-d;i<=31&&i>0;i+=7){
cout<<i<<" ";
l=i;}
cout<<endl<<"Month 2: ";
l+=7;
if(isleap){
for(int i=l-31;i<=29&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 3: ";
for(int i=l-29;i<=31&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
	}
else{
for(int i=l-31;i<=28&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 3: ";
for(int i=l-28;i<=31&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
	}
l+=7;
cout<<endl<<"Month 4: ";
for(int i=l-31;i<=30&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 5: ";
for(int i=l-30;i<=31&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 6: ";
for(int i=l-31;i<=30&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 7: ";
for(int i=l-30;i<=31&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 8: ";
for(int i=l-31;i<=31&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 9: ";
for(int i=l-31;i<=30&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 10: ";
for(int i=l-30;i<=31&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 11: ";
for(int i=l-31;i<=30&&i>0;i+=7){
	cout<<i<<" ";
	l=i;}
l+=7;
cout<<endl<<"Month 12:";
for(int i=l-30;i<=31&&i>0;i+=7){
	cout<<" "<<i;
	l=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 N,d;
bool l;
cin>>N>>d;

if(1000<=N && N<=1000 && 1<=d && d<=12){
	if((N%4==0) || (N%400==0)){l=true;}
        else{l=false;}
      
    if(l=true){ }
}

}

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