CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int a , b;
	bool c=true,d=false;
 cin>>a>>b;
 for(int i=a  ; i<=b ; i++)
 {
	  for(int j=a  ; j<=b ; j++)
	  {
                   for(int k=a  ; k<=b ; k++)
		   {
			   if(k*k+j*j==i*i&&j<k)
			   {
				   c=true;
				  for(int l=2 ; l<=b ; l++)
				  {
					  	 if(k%l==0&&j%l==0&&i%l==0)
					          {
						   c = false;
					          }
				   }
		 		 if(c==true)
		 		 {
			 		 cout<<j<<" "<<k<<" "<<i<<'\n';
					d = true; 
		 		 }
	                    }
                   }
           }} 
if(d==false){
	cout<<0;
}
}

Grading criterion: Are triplets printed in increasing order?
Rating A: correct
Rating B: Incorrect
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program
{
	int start = 0;
	int end = 0;
	int commonfactor = 0;
	int notriplet = 1;
	cin >> start >>end;
	for(int a = start;a<=end;a++)
	{
		for(int b =a;b<=end;b++)
		{
		
			float c = sqrt(a*a+b*b);
			if(int(c)==c and c<=end)
			{
				for(int i = 2;i<=c;i++)
				{
					if(a%i==0 and b%i==0 and int(c)%i==0)
					{
						 commonfactor = 1;
						 break;
					}
				}
				if(commonfactor==0)
				{
					cout << a << " " << b << " " << c << endl;
					notriplet = 0;
				}	
			}
			commonfactor = 0;

		}
		

	}
	if(notriplet == 1)
	{
	cout << 0;
	}

}

Grading criterion: Are triplets printed in increasing order?
Rating A: correct
Rating B: Incorrect
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int n,i,b,c;
	cin>>n>>i;
	int a=n;
	b=n+1;
	c=n+2;
	while(c<=i-2){
	if(pow(a,2)+pow(b,2)==pow(c,2)){
		cout<<a <<b <<c;
	}
c++;

	}}

Grading criterion: Are triplets printed in increasing order?
Rating A: correct
Rating B: Incorrect
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program
{double a,b;
cin>>a>>b;
for(double i=a+1; i<=b; i++)
{
for(double j=i; j<=b-1; j++)
{
for(double k=b-1; k>=j; k--)
{
if((k*k==((i*i)+(j*j))))
{cout<<i<<" ";
cout<<j<<" ";
cout<<k<<" ";
}
}
}
}

}

Grading criterion: Are triplets printed in increasing order?
Rating A: correct
Rating B: Incorrect
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>

main_program
{
int i = 0;
int a,b;
int m = 3;
cin>>a>>b;
if(a>3 || b<5){
while(a<((m*m)-1) && a<2*m && ((m*m)+1)<b)
{
cout<<2*m<<" "<<(m*m)-1<<" "<<((m*m)+1)<<endl;
m++;
i++;
}}
if(a<3 && b>5)
{
	cout<<3<<" "<<4<<" "<<5<<endl;
while(a<((m*m)-1) && a<2*m && ((m*m)+1)<b)
{
cout<<2*m<<" "<<(m*m)-1<<" "<<((m*m)+1)<<endl;
m++;
i++;
}
}

if(i == 0)
{
	cout<<0;
}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
             int start;
	     int end;
	     cin>>start;
	     cin>>end;
	     int a;int b; int c;
	     
	     a=start;b=a+1;
	    
	     
	     
             while(start<=a && a<=end){
		     while(start<=b && b<=end){c=pow(((a*a)+(b*b)),0.5);
			     
			     if(start<=c && c<=end )
			     
			     {
				     cout<<a<<" "<<b<<" "<<c<<endl;}
			     b++;} 
		     a++;}


}
















































/*	int m,n;
	cin>>m;
	cin>>n;
	int small;
	int large;
	large=m;
	small=n;
	if(n>m){large=n;
		small=m;}
	for(int i=1;i<=small;i++){
	   if(large%i==0 && small%i==0){cout<<i<<endl;}}*/

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
   int start,end;
   cin >> start >> end;
  int flag=0;
   while(start<end){
         int a,b,c;
	 float d;
	 a=start;
	
	   for(b=a+1;b<end;b++){
          c=sqrt(a*a + b*b);
	  d=sqrt(a*a + b*b);
	      if (c==d && c<=end){
		    /*     
		      int e;
		      for(e=2; e<a; e++){
			      if(a%e==0 && b%e==0 && c%e==0  ){
	                              flag=1;     
			      }
		   }
		        
                            if (flag=0){*/
			       cout << a << " "<< b << " " << c<< endl;
			      }
	      }
	
	   start++;
	      
           }
       
   
   }

  
 /* 
   if (flag==0){
     cout<<"0"<< endl;
   }
*/

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end;
	cin>>start>>end;
	int a=1,b=2,c=3;
	while(end>=start&&a<b<c){
		if(c*c==a*a+b*b){
			cout<<a<<b<<c;}
		else{
			c++;
			if(a*a+b*b==c*c){
				cout<<a<<b<<c;}
			else{
				b++;
				if(a*a+b*b==c*c){
					cout<<a<<b<<c;}
				else{
					a++;
				if(a*a+b*b==c*c){
						cout<<a<<b<<c;}}}
	}}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
   main_program {
	   int start, end;
	   cin >> start >> end;
   }

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>
main_program{
	int start,end,a,b,c,count=0;
	bool div=true;
	cin >> start >> end;
	for (int i=start;i<=end-2;i++){
		for (int j=i+1;j<=end-1;j++){
			for (int k=j+1;k<=end;k++){
				if (i*i+j*j==k*k){
					a=i;
					b=j;
					c=k;
					div=true;
					for (int l=2;l<=i;l++){
						if ((i%l==0) and (j%l==0)){
							div=false;		
							break;
						}
					}
					if (div){
                				cout << a<< ' ' << b << ' ' << c << endl;
						count=1;
					}
						
					}
				}
			}
	}	
	if (count==0){
		cout <<'0';
	
	}
	}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program
{
int a,b,c,d;
cin>>a>>b;
for(d=a;d<b;d++)
{
for(c=a+1;c<b;c++)
{
float p= a*a+ c*c;
float s=pow(p,0.5);
int h=pow(p,0.5);
if(s==h){ cout<<a<<" "<<c<<" "<<h<<endl;} 
}
}



}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>
main_program{

/*int start,end;
cin >> start >> end;
int a,b,c;


a=start;
b=a++;
c=b++;


while(a<end){

if(a*a+b*b != c*c){
cout << "0";
}

else{
cout << a << " " << b << " "<<c;
}

a++;



}
*/


int start,end;
cin >> start >> end;

if(start==40 && end==70){
cout << "0";
}

else if (start==1 && end==30){
cout << "3" << " " << "4" <<" "<< "5"<<endl;
cout << "5" << " " << "12" <<" "<< "13" << endl;
cout << "7" << " " << "24" <<" " << "25" <<endl;
cout << "8" << " " << " 15" << " "<< "17" <<endl;
cout <<	"20" << " "<< "21" << " " << "29" ;
}

else if(start==50 && end ==100){
cout << "65" << " "<< "72" << " " << "97";
}

else if(start==100 && end ==200){
cout << "104" << " "<< "153" << " "<< "185"<<endl;
cout << "119" << " "<<"120" << " " << "169" <<endl;
}

else if ( start==500 && end==1000){
cout << "504" << " " <<"703" << " " << "865" << endl;
cout << "533" << " "<< "756"<< " "<< "925" << endl;
cout << "540" << " " << "629" << " "<< "829" << endl;
cout <<"555" << " " << "572" << " " << "797" <<endl;
cout << "580" << " " <<"741" << " " << "941" << endl;
cout << "615" << " " << "728" << " " << "953" << endl;
cout << "616" << " " << "663" << " " << "905" <<endl;
cout << "696" << " " << " 697" << " " << "985" ;

}




}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end,a,b=12;
	float c;
	cin>>start>>end;
	a=start;
	while(a<=end){
		while(b>a && b<end){
		c=sqrt((a*a)+(b*b));
		float d=arccosine((a*a)+(b*b)-(c*c))/(2*a*b);
		if(d==90){
			cout<<a<<" "<<b<<" "<<c<<endl;}
		else b++;}
		a++;}}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>
main_program {
	int s, e, a;
	cin >> s >> e;
	while ( s <= e ) {
		a = s++;
		for (int b=a+1; b<=e; b++) {
			 for (int c=b+1; c<=e; c++) {	
			     	if ( a*a + b*b == c*c ) {
						cout << a << " " << b << " " << c << endl;
				}
			}
		}
	}	 
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<iostrean>
#include<simplecp>
using namespace std;
int main(){
	int a,b,c;
	cout<<"start";
	cin<<a;
	cout<<"end";
	cin>>c;

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>

main_program{

// checking logic

	/*	int n=4;
	int m=5;

	int k=sqrt(n*n +m*m);
	
	cout << k << endl;
	cout << sqrt(n*n +m*m);
	 */



	int start;
	int end;
	bool test=false;

	cin >> start >>  end;

	for(int i=start+1; i<= end; i++){
		for (int j=i+1;j<=end ; j++){
		       
	 		float g =sqrt(i*i +j*j);
			 int h = g;
			float k=h;
//			cout << i << " " << j << " " << k << " " << g << endl;
			
			
			int a=j;
			int b=i;


				
			   int gcd=1;
		        while(a%b>0){

                		gcd=a%b;
		                a=b;
		                b=gcd;
				        }



			if (k<=end && k==g && gcd==1 ){
				cout << i << " " << j << " " << k << endl;
				test=true;
				}
			}

	

	}
	
	if (test==0){
		cout << "0";}

}
// checking gcd code

/*	int gcd=0;
	while(a%b>0){
		
		gcd=a%b;
		a=b;
		b=gcd;
	}
	cout << gcd; */

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program
{
	int start, end;
	int a,b,c;
	bool flag=true;
	cin>>start>>end;
	for(a=start+1; a<end; a++)
	{
		for(b=start+2; b<end; b++)
		{
			if(b>a)
			{
			for(c=start+3; c<=end; c++)
			{
				int add=pow(a,2)+pow(b,2);
				if(add==pow(c,2))
				{
					for(int i=2; i<=c; i++)
					{
						if(c%i==0 && b%i==0 && a%i==0)
						{
							flag=false;
						}
					}
					if(flag==true)
					cout<<a<<" "<<b<<" "<<c<<endl;
				}
			}
			}
		}
	}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<iostream>
using namespace std ;

int main(){
	int start , end , count = 0 ;
	cin >> start >> end ;
	
	
		for(int i = start ; i <= end; i++)
		{
			for(int j = i+1 ; j <= end ; j++)
			{
				for(int k = j+1 ; (k <= end) ; k++)
				{
				       	 int ksq = k*k;
					 int jsq = j*j;
					 int isq = i*i ;
					 bool factor = 1;  
					 for(int a = 2 ; a <=100 ; a++)
					 {
						  
						 if(((k%a)==0)  &&((j%a)==0) &&((i%a)==0)){factor = 0 ;break;}
						 
						
					 } 
					
					if( ksq == (jsq + isq))
					{
						if(factor){
						cout << i <<" " << j <<" "<< k << endl ;
						count++ ;
						}		
					}
				}
			}
		}

		if(count == 0){cout << "0";}
	

}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int a,b;
	cin>>a;
	cin>>b;
	int x=a;
	int y=a;
	int z=a;
		while(x<=b && x>=a){
		   while(y<=b && y>=a){
		      while(z<=b && z>=a){
		      if (x*x+y*y ==z*z){
			      cout<<x<<" "<<y<<" "<<z;
		               z++;}
		      else{z++;}
		      }
		      y++;
		   }
		    x++;
		}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>

main_program{
	int start, end;
	bool z=false;
	cin >> start >> end;

	for(int a=start;a<=end;a++){
		for(int b=a;b<=end;b++){
			float j=sqrt(a*a+b*b);
			int k=sqrt(a*a+b*b);

			if((j-k==0)&&(k<=end)){
				
				bool r=false;
				for(int q=start;q<=end;q++){
					bool t=true;
					for(int i=2;i<q;i++){
						t=t && (q%i !=0);
					}

					if(t){
						if(a%q!=0 && b%q!=0 && k%q!=0) r=true;
					}
				}
				if(r){
					z=true;
                                cout << a << " " << b << " " << k << endl;

				}
	
			}
		}
	}
	if(z==false){
		cout << "0" << endl;
	}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{

	int start,end,a,b,c,sum,third;
	cin>>start;cin>>end;
	a=start,b=start,c=start;
	if(start>=1 && end <=10000 && start<=end //(a%2!=0 && b%2!=0 && c%2!=0)){
		){
	//	if(a%2!=0 && b%2!=0 && c%2!=0){
		//	if((a>=start&&a<=end) && (b>=start&&b<=end) && (c>=start&&c<=end)){
		//	if(a<b && b<c){
			//	while(true){
			//	while(a<=end && b<=end && c<=end){
				//	a=start,b=start,c=start;
				while(false){
				sum=a*a+b*b;
				third = c*c;if(sum==third){
			//	sum==third;
				cout <<a <<" "<<b<<" " <<c<<" "<<endl;
			}a=a+2;b=b+3;c=c+4;}
			
			}
		}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program {
	
int start;
int end;

cin >> start >> end;
while(true){
	float a;
	float b;
	float c;
if(start > end)break;
if(start < end){
	if(start <= a && start <= b && start <=c && end >= a && end >=b && end >= c){
		if(c=pow((a*a*1.0 + b*b*1.0),0.5))
		{
			if(a<b){
				cout << "a b c" << endl;
			}
			else{
				cout << "b a c" << endl;
			}
 		}
		else continue;
			

	}
	else break;
}
}










}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp> 
main_program { 
	int start, end ; 
	int a=end-2,b=end-1,c=end ; 
	cin >> start >> end ; 
	bool f = true ; 
	if (a + b < c || a + c < b || b + c < a) {
		f = false ;
		while() {
	       while (a > 0) { 	
	if (a*a + b*b = c*c) { 
		cout << a <<" "<< b <<" "<< c ; 
		a-- ; 
	}
	       }
	       }

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end;
	int a,b,c;
	cin>>start;
	cin>>end;
	int flag=0;
	
	a=start;b=a;c=b;
	for(a=start;a<end;a++){
		for(b=a;b<end;b++){
			for(c=b;c<end;c++){
				if(c*c==(a*a)+(b*b)){
					
					for(int i=2;i<=c;i++){
						if(a%i==0 && b%i==0 && c%i==0){
							flag=0;
							break;}

						else{ 
					  	flag=1;
						}

						}if(flag==1)
					cout<<a<<" "<<b<<" "<<c<<endl;
					}
				
				}
			}
		}
	}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
int start, end;
cin >> start  >> end;
/*if (start<1 || start>end){
       cin>>start;
}
if (end>10000){
	cin >>end;
}
*/
int a=0, b=0, c=0, i=0, f=0, j=0, k=0;
a=start;
b=a+1;
c=a+2;
cout<< "ready to enter loop" <<endl;
for (i=0; end>=c; i++, c++){
	cout<< "loop1" << endl;
	for (j=0; c>b; j++, b++){
		cout<< "loop2" <<endl;

		for (k=0; b>a; k++, a++){
			cout << "loop3" <<endl;
 			if ((a*a + b*b)==c*c){
				cout<< "yes"<<endl;
				if (b%a!=0){
					cout<<a<< " " <<b<< " "<< c<<endl;
					f++;
					cout<<f;
				}
			}
		}
	}
}
if (f==0) {cout<<0;}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end;
	cin>>start>>end;
	int a,b,c,d;	;
        for(int i=start;i<=end,i++){
		a=i;
	}
		for(int j=start;j<=end,j++){
		b=j;
		}
			for(int k=start;k<=end,k++){
				c=k;
}
				d=a*a+b*b;
				if(d==(c*c)){

		if(a>b && b<c){
	bool ncf=true;
		}
for( int l=2;l<a,l++){
(b%l==0 && c%l==0){
	ncf=false;
	break;
}
}
if(ncf){
	cout<<a<<" "<<b<<" "<<c<<" "<<endl;

}
}
if(printed==false){
}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B