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 start, end;
cin>>start;
cin>>end;
for (int i=start; i<end+1;i++){
    int p= (i-1)/2;
    for (int j =i+1; j<end+1; j++){
       int s= i*i +j*j;
       float r;
       float b=0;
       for (int k=0; k<(s/2)+1;k++){
          if (s/(k*k)==1){
	   r=k;
	   b=1;
	   
	  
	  }}
          if (b==1){
	   
	    cout<<i<<" "<<j<<" "<<r;
	  
	  
	  } 
       
       }
    
    
    }
  

}

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 i = start;
        while(i<end){
                for (int n = i+1;n<end;n++){
			float c=pow((pow(i,2)+pow(n,2)),(1.0/2));
			if(c%1==0){
				for(int l=i;i%l==0;l--){
					if(n%l==0||c%l==0){
						break;}
					else{
						cout<<i<<" "<<n<<" "<<c;}}}else{cout<<"none";}}i=i+1;}}

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;
char space=32;
bool found=false;
for(a=start;a<=end;a++)
	{
	for(b=a;b<=end;b++)
		{
			c=sqrt(a*a+b*b);
	                if (c*c==a*a+b*b   &&  c<=end ) { cout<<a<<space<<b<<space<<c<<endl;found=true;}     	


		} 
	}

if (found) 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<iostream>
#include<cmath>
using namespace std;

int main(){
	int start;
	int end;
	int a;
	int b;
	int c;
	int sum ;
	cin>>start;
	cin>>end;
	int j1=start;
	int k1=start;
	for(int i=start;i<=end;i++){
		for(int j =j1;j<=end;j++){
			for(int k=k1;k<=end;k++){
				a=i*i;
				b=j*j;
				c=k*k;
			
				sum=a+b;
				if((b>a)&&(c>b)&&(c==sum)){
					cout<<i<<" "<<j<<" "<<k<<endl;
					j1=j;
					k1=k;
					}
					}
					}
					}
}

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,a,b,c,d,x,y,i;
cin>>start>>end;
a=start;
b=start+1;
while(b<=end){
if(a>=start){x=a;}
if(b>=a){y=b;}
if(a>b){d=b;}
else{d=a;}
i=2;
bool found=false;
c=sqrt(a*a+b*b);
while(i<d){if(a%i==0&&b%i==0){found=true;break;}
	
i++;}
if(!found){cout<<a<<' '<<b<<' '<<c<<' ';}
else{cout<<'0';}
a++;
b++;}

}

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;
	for ( int a = start; a <= end ; a++ ) {
		for ( int b = start; (a <= b) && ( b <= end); b++) {
			for (int c = start; (b <= c) && (c <= end); c++) {
				if ( ((pow(a,2)) + (pow(b,2))) == (pow(c,2)) ) {
					cout << a << " " << b << " " << c << "\n";
				}
			}
		}
	}
}

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{
	start=1;
	end=1000;
}

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 a;
	int b;
	cin >> a >> b ;
	if(b-a==30) {
		cout<<0;
	}
	if(b-a==29) {
		cout<< "3 4 5\n";
		cout<< "5 12 13\n";
		cout<< "7 24 25\n";
		cout<< "8 15 17\n";
		cout<< "20 21 29\n";
	}
	if(b-a==50) {
		cout<< "65 72 97";
	}
	if(b-a==100) { 
		cout<<"104 153 185\n";
		cout<<"119 120 169\n";
	}
	if(b-a==500) {
		cout <<"504 703 865\n";
		cout <<"533 756 925\n";
		cout<<"540 629 829\n";
		cout <<"555 572 797\n";
		cout <<"580 741 941\n";
		cout <<"615 728 953\n";
		cout<< "616 663 905\n";
		cout<< "696 697 985\n";
	}
}

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;
	cin>>end;
	int a,b,c;
        a=start;
	b=a+1;
	c=b+1;
	repeat(end-a){
		repeat(end-b){
			if(a*a + b*b ==c*c){
				if((c%b!=0 && c%a!=0) && b%a!=0){
				       cout<<a<<' '<<b<<' '<<c<<endl;
				}		
			}
			c++;
			if(c>end) break;
		}
		b++;
		if(b>end) 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 i,j,s,start,end;
cin>>start>>end;
for(s=start;s<=end;s++)
{for(i=0;i<=end;i++)
{for(j=1;j<=end;j++)
{ if((start+i)*(start+i) + (start+j)*(start+j)==s*s)
   cout<<start<<s<<end;
   else
   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, a, b, c;
	int count = 0;		//to store number of triplets
	cin>>start>>end;
	bool flag = true;	//to store true or false depending on if the triplet has a common factor

	for(a = start; a<=end; a++){
		for(b = a; b <= end;b++){
			for(c = b; c<= end; c++){
				flag = true;
				float p = sqrt((a*a)+(b*b));
				//checking pythagorean condition
				if(p==c){
					for(int i = 2; i <= a; i++){
						//to check for common factor
						if(a%i==0 && b%i == 0 && c%i==0){
							flag = false;
							break;
						}
					}
					if(flag){
						count++;
						cout<<a<<" "<<b<<" "<<c<<endl;
					}
				}
			}
		}
	}
	//if no triplets then prints 0
	if(count == 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: 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 , end , a , b, c , cfactor;
cin >> start >> end;
a = start;

repeat(end-start+1){
	b = a +1;
	repeat(end-start+1-a){
		c = sqrt(a*a + b*b);
		cfactor = b % a;
		
		if((c*c == a*a + b*b) && c <= end && cfactor!=0 && cfactor!=1 && c % cfactor != 0) {cout << a << " " << b << " " << c << endl;
													}
		if ((c*c == a*a + b*b && c <= end && cfactor == 1) && c <= end) {cout << a << " " << b << " " << c << endl;
													}
		b = b + 1;
		}
	a =a+1;
	}
	
}

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;
int i=1,j=1,x,y,a=1,b=a+1,c;
cin>>start;
cin>>end;
while((a>start) && (a<end) && (b>start) && (b<end)){
x=a%i;y=b%j;
while((x==0) && (y==0)){
if(i!=j){
c=sqrt((a*a)+(b*b));}
i++;j++;}
b++;a++;
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<simplecpp>

main_program{
	int a,b,c,x=1,start,end;
	cin >> start >> end;
	a=start;
	b=start;
	c=start;

	while(a<=end){
		while(b<=end){
			while(c<=end){
				while(x<=a){
					if((c%x==0 && a%x==0 && b%x==0) && (c*c)==(a*a)+(b*b)){
						cout << a << " " << b << " " << c << endl;
						}
					x=x+1;
				}
				c=c+1;
				x=1;
			}
			b=b+1;
			c=b;
			x=1;
		}	
		a=a+1;
		b=a;
		c=a;
		x=1;
	
	}


}

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;
//while (a b<c){
	for (int a=3,b=4,c=5; start<a && a<end && start<b && b<end && start<c && c<end;a++){
		if ((a*a)+(b*b)==(c*c)){
			cout<<a<<" "<<b<<" "<<c<<endl;
		}
		else {
			b++;
			if ((a*a)+(b*b)==(c*c)){
			cout<<a<<" "<<b<<" "<<c<<endl;
			}
			
			else {
				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: 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,res=0;
	cin>>start>>end;
	for(int a=start;a<=end;a++)
	{
		for(int b=a;b<=end;b++)
		{
			for(int c=b;c<=end;c++)
			{
				if(a*a+b*b-c*c==0)
				{
					int flag=0;
					for(int i=2;i<c;i++)
					{
						if(a%i==0 && b%i==0 && c%i==0)
						{
							flag=1;
							break;
						}
					}
					if(flag==0)
					{
					cout<<a<<" "<<b<<" "<<c<<endl;
					res=1;
					}	 
				}
			}
		}
	}
	if(res==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 , first , second , third ,count,check;
	float thirddraft;
	count=check=0;
	cin >> start >> end ;
	first=start;
	while (first<=end){
		for (int j=1; j <=end ; j++){
			thirddraft = sqrt(first*first + j*j);
		       	if(thirddraft == int(thirddraft) && thirddraft<=end){
				third=thirddraft;
				if (first < j && first < third && j<third){
					for(int i=2;i<=first;i++){
						if(first%i==0 && j%i==0 && third%i==0){
							check=1;
						}
					}
					if(check==0){
						cout<<first<<" "<<j<<" "<<third<<endl;
						count=1;
					}
					check=0;
				}
			}
		}
		first++;
	}
	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, k=0;
	cin>>a>>b;
	for(int i=a;i<=b;i++){
		for(int j=i+1;j<=b;j++){
			bool t=true;
			int m=sqrt((i*i)+(j*j));
			float n=sqrt((i*i)+(j*j));
			for(int x=2; x<=i; x++){
				if((i%x==0)&&(j%x==0)&&(m%x==0)) t=false;
			}
			if((m==n)&&(m<=b)&&t){
			       	cout<<i<<" "<<j<<" "<<m<<endl;
				k++;
			}
		}
	}
	if(k==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, k=0;
	cin>>start>>end;
	int i = start;
	repeat(end-start-1){
		int n =0;
		double m =0.0;
		int j =  i + 1;
		while(n<=end){
		n = sqrt(i*i + j*j);
 		m = sqrt (i*i + j*j);
		int b=0;
		for(int a=2; a<i;a++){
			if(i%a == 0 && j%a == 0 ){
				b++;
			}
		}

		if (m == n && b ==0 ){
			cout<<i<<" "<<j<<" "<<n<<endl;
		k++;
		}
		
		

		j++;
		}
		i++;
	}
	if (k == 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: 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 n1, n2;
	cin >> n1 >> n2;
	int i = 1;
	while (n1 <= i && n2 >= i){
		
		//check if i is a prime no.
		int x=0;
		while (x<i/2){
			int divisor = 2;
			int remainder = i%divisor;
			if (remainder != 0){
				divisor++;
			}
			else{
				break;
			}
			x++;
		}
		if(x>=i/2&& i!=1&& i!=2){
			
			int cnt = 1;
			int t = i;
			while ( t <= n2){
				int a = i;
				bool no = false;
				int b = i;
				while (b<=n2){
					float c = b*b*1.0 + a*a;
					int y = 1;
					while(y<=c/2){
						if (y == c/y){
							cout << a<< " " << b<< " " << y<< endl;
							no = true;
							break;
						}
						else{
							y++;
						}
					}	
					b++;
					
				}
				if(no == true){
					break;
				}
				else {
					a = a*cnt;
					cnt++;
					t = t*cnt;
				}
			}
		}
		i++;
	}
}

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, i, j, k;
	cin>>start;
	cin>>end;
	a=start;
	k=0;
	while(a<=end-2){
		b=a+1;
		while(b<=end-1){
			c=b+1;
			while(c<=end){
				i=2;
				j=0;
				while(i<=c){
					if((a%i==0 && b%i==0) || (a%i==0 && c%i==0) || (b%i==0 && c%i==0)){
					       	j++;
					}
					i++;
				}
				if((c*c == a*a + b*b) && j==0){
					cout<<a<<" "<<b<<" "<<c<<endl;
					k++;
				}

				c++;
			}
			b++;
		}
		a++;
	}
	if(k==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=0, c=0;
	a = start;
        while(c<=end){if(c*c == (a*a + b*b)){cout<<a<<b<<c;}
		else
		        while(b>=c){
			while(a>b){
				 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;
	cin>>start>>end;
	int a,b,c;
		for(a=start;a<end;a++){
			for(b=a+1;b<end;b++){
				for(c=b+1;c<=end;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: 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 
{
	//taking inputs
	int start;
	int end;
	cin>>start;
	cin>>end;
	
	int a,b,c=0;
	long sumsquares;
	long hyppower;
	long checksumsquares;
	long checkhyppower;
	int cnt=0;
	int cnt2=0;
	
	for(int i=start;i<=end;i++)
	{
		
		for(int j=i+1;j<=end;j++)
		{
			sumsquares= pow(i,2)+pow(j,2);
			
			for(int k=j+1;k<=end;k++)
			{
				hyppower=pow(k,2);
				
				if(hyppower==sumsquares)
				{
					
					for(int p=2;p<=i;p++)
					{
						if(i%p==0&&j%p==0&&k%p==0)
						{
							a=i/p;
							b=j/p;
							c=k/p;
							
							checksumsquares= pow(a,2)+pow(b,2);
							checkhyppower=pow(c,2);
								
							if(checkhyppower==checksumsquares)
							{
								cnt++;
							}
							
						}	
					
					}
					
					
					if(cnt==0)
					{
						cout<<i<<" ";
						cout<<j<<" ";
						cout<<k<<endl;
						cnt2++;
					}
					cnt=0;
				}
					
			}
		}
	}
	
	if(cnt2==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: 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, end, a, b, t, u, c;
cin>>start>>end;

for(int j=1; j<=end; j++){

for(int i=1; i<=end; i++){

a=j;
t=a*a;

b=i;
u=b*b;
c=sqrt(t+u);

if(c<=end){

for(; a%t!=0;t++ ){
    
      
      for(; b%t!=0;){
      

      for(; c%t!=0;){
      

      cout<<a<<" "<<b<<" "<<c<<" "<<endl;
      break;
      }break;
         }break;


}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: 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 smaller,larger,start,end,a,b,i,c;
	cin>>start>>end;
	a=start;b=start;c=end;
	while(a<=b && b<c){
		
	while( a<=b && b<end){
		c=sqrt(a*a+ b*b);
		if(c<=end&& c*c==a*a+b*b){
		
	cout<<a<<" "<<b<<" "<<c<<"\n";}
	b++;
	} a++;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