Answer:
The Basic Program is as follows:
10 LENGTH = 50
15 WIDTH = 30
20 AREA = WIDTH * LENGTH
25 PRINT AREA
30 END
The Algorithm is as follows:
1. Start
2. Let Length = 50
3. Let Width = 30
4. Compute Area = Length * Width
5. Display Area
6. Stop
See Attachment for flowchart (flowchart is designed using draw io tools)
Explanation:
The flowchart, algorithm and basic program all follow the same sequence and explanation
Using the basic program as a case study;
Line number 10: The program starts by initializing LENGTH to 50
Line number 15: It then initializes WIDTH to 30
Line number 20: The AREA is calculated by LENGTH * WIDTH
Line number 25: The value of AREA is printed afterwards
Line number 30: Lastly, the program stops execution
Answer:
1. multiplying two numbers when you meant to add them - Logical Error
2. dividing by zero - Compile time error
3. semi colon at the end of a programming statement - Logical error
4. wrong in output - Run time error
5. when you should have typed a - Compile time error
6. producing inaccurate results - Logical error or Run time error
Explanation:
Compile time error is a lack in computer programming which causes to violate the rules which are defined by user in the program.
Run time error produces wrong outputs. It causes lags in the softwares which makes the output inefficient. It even causes programs crash when the output is just seconds away.
Logical error is the situation where programs completes the task assigned but with the wrong syntax. The output is produced with some abnormality.
Answer:
D
Explanation:
The answer is D because if you're looking for lightweight materials, you'll be dealing with chemistry, and chemistry is sience.
It is either hard drive or solid state drive
Answer:
#include <stdio.h>
int main() {
const float square_feet;
printf("Enter area in square feets: ");
// reads and stores input area
scanf("%f", &square_feet);
float acres= square_feet/43560;
// displays area in acres
printf("area in acres is: %.2f", acres);
return 0;
}
Explanation:
code is in C language.
double slashed '//' lines are not code but just comments to understand what it mean in code or for explanation purpose