Professional Documents
Culture Documents
Assignment 5.1
Assignment 5.1
Assignment 5.1
Garcia Score:
Section: 2 CPE-A Date: September , 2020
ASSIGNMENT 5.1
Problem 1 Problem 2
START
START
Double[,] salary = {
{ 115, 215, 342.50, 510 }, Double[,] salary = {
{ 125, 232.50, 360, 620 }, { 115, 215, 342.50, 510 },
{ 145, 245, 380, 740 }, { 125, 232.50, 360, 620 },
{ 167.50, 267.05, 405, 850 }, { 190, { 145, 245, 380, 740 },
290, 440, 990 }}; { 167.50, 267.05, 405, 850 }, { 190,
290, 440, 990 }};
Console.Writeline(“Skill Grade
1 Step 2\n\nDaily Rate:
${0}”,salary[2,1]); Console.Writeline(“Average pay of
Grade 3 programmers pay ${0}”);
END
Double avePayGrade3 = (salary[0,col]
+ salary[1, col] + salary[2, col] +
salary[3, col] + salary[4, col]) / 5;
END
Problem 3
START
Double[,] salary = {
{ 115, 215, 342.50, 510 },
{ 125, 232.50, 360, 620 },
{ 145, 245, 380, 740 },
{ 167.50, 267.05, 405, 850 }, { 190, 290,
440, 990 }};
Double[]averagePayGrades = new
double[4] ;
Y
E
S
Y
E
YES S
(“
Double averagePayGrade in
“) average PayGrades
YES NO
(“${0, -10}”,
averagePayGrade / 5
END
START
Problem 4
Double[,] salary = {
{ 115, 215, 342.50, 510 },
{ 125, 232.50, 360, 620 },
{ 145, 245, 380, 740 },
{ 167.50, 267.05, 405, 850 }, { 190, 290,
440, 990 }};
Double averagePayGrade = 0;
int i = 0; i < 5; i+ \n
NO
END 4 +
Y
E
S
Y
E
S
“${0,-10}”, salary[I, j]
averagePayGrade += salary[I, j]
j == 3
NO
YES
averagePayGrade/=4
“{0;F2”,
averagePaygrade 3
START
Problem 5
Double[,] salary = {
{ 115, 215, 342.50, 510 },
{ 125, 232.50, 360, 620 },
{ 145, 245, 380, 740 },
{ 167.50, 267.05, 405, 850 }, { 190, 290,
440, 990 };
int i = 0; <
NO 4; i++
END
5
YES
\n
NO
YES
YES
J == 4 +
YES
6
j == 4
“ = {0}, {averagePayGrade[i]*-1
Problem 6 START
Double[,] salary = {
{ 115, 215, 342.50, 510 },
{ 125, 232.50, 360, 620 },
{ 145, 245, 380, 740 },
{ 167.50, 267.05, 405, 850 },
{ 190, 290, 440, 990 }};
\n
YES
YES
“${0,-10}”, salary[I, j]
int j = 0; j
YES < 4; j++ NO
\n
YES
“${0,-10}”, (salary[I,
j]*0.035)
10
Problem 7 START
“\n\nCurrent Daily Rate: ${0}\n”,
salary[stepRow, payGradeCol]
“-----------------\n\nIncrease When
Promoted to: \n”
Double[,] salary = {
int i = stepRow, I
< 5; i++ NO
YES
END
\n
payGrad YES
eCol != 3
NO “\nSTEP;
{0}\n,i
NO
Int j =
!int.TryParse
(Console.ReadLine (),
payGradeC
out PayGradeCol) II ol; j < 4; j++
payGradeCol > 3 II
payGradeCol < 0
YES YES
YES
(salary[I, j]) ==
Whole Numbers 0-3 are
currentPayGra
Allowed
de
NO
Enter Stop
NO
YES
NO
Whole Numbers 0-3
are allowed
currentPayGrade =
11
salary[stepRow,
Problem 8 START
payGradeCol];
“\n\nCurrent Daily Rate: ${0}\n”,
salary[stepRow, payGradeCol]
10 “-----------------\n\nIncrease When
Promoted to: \n”
Double[,] salary = {
int i = stepRow, I
< 5; i++ NO 12
YES
END
\n
payGrad YES
eCol != 3
NO “\nSTEP;
{0}\n,i
NO
Int j =
!int.TryParse
(Console.ReadLine (),
payGradeC
out PayGradeCol) II ol; j < 4; j++
payGradeCol > 3 II
payGradeCol < 0
YES YES
YES dailyRateIncreased =
salary[i,j] +
Whole Numbers 0-3 are (salary[i,j]*0.035);
Allowed
NO
Enter Stop
dailyRateIncre
ased ==
currentPayGra
de
!int.TryParse
(Console.ReadLine (),
out payGradeCol) II NO
payGradeCol < 0
currentPayGrade =
13
(salary[stepRow,
Problem 9 START
payGradeCol];*0.035)
“\n\nCurrent Daily Rate: ${0}\n”,
salary[stepRow, payGradeCol]
11 “-----------------\n\nIncrease When
Promoted to: \n”
Double[,] salary = {
int i = stepRow, I
< 5; i++ NO 14
YES
END
\n
payGrad YES
eCol != 3
NO “\nSTEP;
{0}\n,i
NO
Int j =
!int.TryParse
(Console.ReadLine (),
payGradeC
out PayGradeCol) II ol; j < 4; j++
payGradeCol > 3 II
payGradeCol < 0
YES YES
YES
(salary[I, j]) ==
Whole Numbers 0-3 are
currentPayGra
Allowed
de
NO
Enter Stop
NO
currentPayGrade = (salary[stepRow,
payGradeCol]* 0.035)
13