Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2 Given the following steps of the problem-solving phase of a computer program's life cycle: 1 - Translate the general solution into code. 2
Question 2
Given the following steps of the problem-solving phase of a computer program's life cycle: 1 - Translate the general solution into code. 2 - Write a general solution for the problem. 3 - Test the general solution. 4 - Analyze the problem. 5 - Test the solution on a computer. The proper sequence is: | |
a) | 1 2 3 4 5 |
b) | 2 3 1 4 5 |
c) | 4 2 3 1 5 |
d) | 4 2 1 3 5 |
e) | 2 1 3 5 1 |
Question 3
I asked the user to enter the percentage by which a price has gone up and they enter 10 to mean 10%. I was assuming the user would enter 0.1 to mean 10%. In my program I calculate the bonus amount as salary * percentage/100 as I expected the user to enter 10 and not 0.1 . This will result in what type of error? | |
a) | syntax error |
b) | run-time error |
c) | compiler error |
d) | logic error |
e) | b and c above |
Question 4
While typing a program, a student misspelled a C++ command. This will result in what type of error? | |
a) | syntax error |
b) | run-time error |
c) | compiler error |
d) | logic error |
e) | b and c above |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started