diff --git a/Problem3.java b/Problem3.java new file mode 100644 index 0000000000000000000000000000000000000000..5487bac127b68ca13da413ccebaa599b8432b003 --- /dev/null +++ b/Problem3.java @@ -0,0 +1,14 @@ +import java.util.Scanner; + +public class Problem3 { + private static Scanner scanner = new Scanner(System.in); + public static void main(String[] args) { + float payRate; + float hoursWorked; + float grossEarnings; + payRate = scanner.nextFloat(); + hoursWorked = scanner.nextFloat(); + grossEarnings = hoursWorked * payRate; + System.out.print(grossEarnings); + } +} diff --git a/Problem4.java b/Problem4.java new file mode 100644 index 0000000000000000000000000000000000000000..e0084ba28dbdd0ab5e7b3ffd135f79a27f757825 --- /dev/null +++ b/Problem4.java @@ -0,0 +1,22 @@ +import java.util.Scanner; + +public class Problem4 { + private static Scanner scanner = new Scanner(System.in); + public static void main(String[] args) { + // Re-order lines 7-19 to solve the problem + System.out.print("A"); + System.out.print("B"); + System.out.print("C"); + System.out.print("D"); + System.out.print("F"); + float examGrade; + if (examGrade >= 90) { + } else if (examGrade >= 60) { + } else if (examGrade >= 70) { + } else if (examGrade >= 80) { + examGrade = scanner.nextFloat(); + } else { + } + // Re-order lines 7-19 to solve the problem + } +} diff --git a/Problem5.java b/Problem5.java new file mode 100644 index 0000000000000000000000000000000000000000..3438c4765800bb360b9738e0c509ce12853f709c --- /dev/null +++ b/Problem5.java @@ -0,0 +1,24 @@ +import java.util.Scanner; + +public class Problem5 { + private static Scanner scanner = new Scanner(System.in); + public static void main(String[] args) { + // Re-order lines 7-21 to solve the problem + System.out.print(averageScore); + averageScore = sumOfScores / numberOfStudents; + currentStudent = 0; + currentStudent = currentStudent + 1; + currentStudentScore = scanner.nextFloat(); + float averageScore; + float currentStudentScore; + float sumOfScores; + int currentStudent; + int numberOfStudents; + numberOfStudents = scanner.nextInt(); + sumOfScores = 0; + sumOfScores = sumOfScores + currentStudentScore; + while (currentStudent < numberOfStudents) { + } + // Re-order lines 7-21 to solve the problem + } +} diff --git a/problem3.coral b/problem3.coral deleted file mode 100644 index 9a69e098d0d5e7ce6c3ed64371967b0f15b6ce31..0000000000000000000000000000000000000000 --- a/problem3.coral +++ /dev/null @@ -1,7 +0,0 @@ -float payRate -float hoursWorked -float grossEarnings -payRate = Get next input -hoursWorked = Get next input -grossEarnings = hoursWorked * payRate -Put grossEarnings to output diff --git a/problem4.coral b/problem4.coral deleted file mode 100644 index 07efea1d1b1f12a49ef1a54aff2ce8b987ffef06..0000000000000000000000000000000000000000 --- a/problem4.coral +++ /dev/null @@ -1,12 +0,0 @@ -Put "A" to output -Put "B" to output -Put "C" to output -Put "D" to output -Put "F" to output -float examGrade -if examGrade >= 90 -elseif examGrade >= 60 -elseif examGrade >= 70 -elseif examGrade >= 80 -examGrade = Get next input -else diff --git a/problem5.coral b/problem5.coral deleted file mode 100644 index 5384cfcc501548dd7c29fda9ce531204650a83ed..0000000000000000000000000000000000000000 --- a/problem5.coral +++ /dev/null @@ -1,14 +0,0 @@ -Put averageScore to output -averageScore = sumOfScores / numberOfStudents -currentStudent = 0 -currentStudent = currentStudent + 1 -currentStudentScore = Get next input -float averageScore -float currentStudentScore -float sumOfScores -integer currentStudent -integer numberOfStudents -numberOfStudents = Get next input -sumOfScores = 0 -sumOfScores = sumOfScores + currentStudentScore -while currentStudent < numberOfStudents