Commit 65f6bc1d authored by rehman.khan's avatar rehman.khan

assess

parent 7805f22d
...@@ -7,29 +7,20 @@ public class AssessmentPartOne { ...@@ -7,29 +7,20 @@ public class AssessmentPartOne {
// Debug this method so it passes the unit test. // Debug this method so it passes the unit test.
// Add comments beside any changes you make // Add comments beside any changes you make
if (num1<num2) if((num1 > num3) && (num1 > num2))
{ {
if (num3>num1) return num1;
{
return num3;
} }
else else if((num2 > num3) && (num2 > num1 ))
{ {
return num1; return num2;
} }
} else return num3;
else
{ }
if (num3>num2)
{
return num3;
}
else
{
return num2
}
}
}
public int sumNumbersBetween(int start, int end) public int sumNumbersBetween(int start, int end)
{ {
...@@ -44,8 +35,20 @@ public class AssessmentPartOne { ...@@ -44,8 +35,20 @@ public class AssessmentPartOne {
int sumOfSquares = 0; int sumOfSquares = 0;
if ((end >=0) && (start >=0) && (start<end) && (end > start+1))
return sumOfSquares;
{
for (int p= start +1;p<end; p++)
{
}
}
else return -1;
return sumOfSquares;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment