Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
small computational problems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SOFT Core
SOFT 160
small computational problems
Commits
83a7723d
Commit
83a7723d
authored
Sep 2, 2023
by
Christopher Bohn
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parents
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
problem3.coral
+7
-0
7 additions, 0 deletions
problem3.coral
problem4.coral
+12
-0
12 additions, 0 deletions
problem4.coral
problem5.coral
+14
-0
14 additions, 0 deletions
problem5.coral
with
33 additions
and
0 deletions
problem3.coral
0 → 100644
+
7
−
0
View file @
83a7723d
float payRate
float hoursWorked
float grossEarnings
payRate = Get next input
hoursWorked = Get next input
grossEarnings = hoursWorked * payRate
Put grossEarnings to output
This diff is collapsed.
Click to expand it.
problem4.coral
0 → 100644
+
12
−
0
View file @
83a7723d
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
This diff is collapsed.
Click to expand it.
problem5.coral
0 → 100644
+
14
−
0
View file @
83a7723d
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment