CPP - Problem Solving - debugging

Quiz
•
Information Technology (IT)
•
11th Grade
•
Hard
John Oli
Used 1+ times
FREE Resource
6 questions
Show all answers
1.
OPEN ENDED QUESTION
3 mins • 20 pts
Instructions:
You are given a buggy C++ program that is supposed to compute the salaries of 5 employees.
The program contains errors in syntax, casing, variables, operators, and computations.
Your task is to debug the program by rewriting it completely in its correct form.
The corrected program must:
Ask for hours worked and rate per hour for 5 employees
Compute and display each employee’s salary
Compute and display the total payroll
Compute and display the average salary of the 5 employees
Type your corrected program in Wayground and submit.
Evaluate responses using AI:
OFF
Answer explanation
2.
OPEN ENDED QUESTION
3 mins • 10 pts
Instructions:
You are given a buggy C++ program that is supposed to calculate the total cost of items.
The program contains errors in syntax, casing, operators, and variables.
Your task is to rewrite the entire program correctly.
The corrected program must:
Ask for the quantity of items
Ask for the price per item
Compute and display the total cost
Type your corrected program in Wayground and submit.
Evaluate responses using AI:
OFF
Answer explanation
3.
OPEN ENDED QUESTION
3 mins • 10 pts
Instruction
Rewrite the program correctly. Identify the errors in the code and fix them so that it runs without errors and produces the correct output.
Evaluate responses using AI:
OFF
Answer explanation
4.
OPEN ENDED QUESTION
3 mins • 10 pts
Instruction
Fix the syntax and logical errors so the program correctly computes the sum of two numbers.
Evaluate responses using AI:
OFF
Answer explanation
5.
OPEN ENDED QUESTION
3 mins • 10 pts
Instruction
Correct the program so that it properly displays the multiplication of two numbers.
Evaluate responses using AI:
OFF
Answer explanation
6.
OPEN ENDED QUESTION
3 mins • 20 pts
Instruction
The following program is supposed to take 5 exam scores from the user, compute the total and average, and display both results. However, the program has multiple errors that prevent it from compiling or working correctly.
👉 Your task is to rewrite the program with the correct syntax and logic.
Evaluate responses using AI:
OFF
Answer explanation
Similar Resources on Wayground
10 questions
KUIS BAB 3

Quiz
•
7th Grade - University
10 questions
SOAL LATIHAN 2

Quiz
•
9th Grade - University
10 questions
KUIS KODING & KA 1

Quiz
•
10th Grade - University
5 questions
Quiz Microsoft Word

Quiz
•
10th Grade - University
10 questions
Pre-tes Komputer dan Perangkat Penyusunnya

Quiz
•
10th Grade - University
10 questions
1.2 Algoritma SK T4

Quiz
•
9th Grade - University
5 questions
Flowchart

Quiz
•
10th Grade - University
10 questions
Quis code blocks

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade
Discover more resources for Information Technology (IT)
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
6 questions
Secondary Safety Quiz

Lesson
•
9th - 12th Grade
13 questions
8th - Unit 1 Lesson 3

Quiz
•
9th - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
16 questions
Metric Conversions

Quiz
•
11th Grade
21 questions
SPANISH GREETINGS REVIEW

Quiz
•
9th - 12th Grade
25 questions
Government Unit 1

Quiz
•
7th - 11th Grade