Explain empirical and theoretical approach for estimating time complexity.
Create a flowchart that will able to read the age of an individual and determine if it qualified to vote or not. The qualifying age to vote is 18 and above. If the age is 18 below, display "too young!". Note that there is no such age as 0 or negative however display "Invalid age" if age is above 100 display "Out of range".
Draw a flowchart that will display "IT'S COLD!" if the temperature is less that 20, "IT'S HOT!" if the temperature is greater than 30, "COOL!" otherwise.
Draw a flowchart that determines if the employee has to be paid of overtime pay (OT). They will be paid an OT if they exceed 40 hours work in a week, regular pay (RP) if less than or equal to 40 hours only. Display "OT Pay" or " RP Pay", based on the entered number of hours a week.
Construct an algorithm that will input values for A and B. Compare the two values inputted and print which of the values is higher including the remark “Higher”.
1.1 A loop must be terminated when the total value of less than a 0 (Zero) is entered.
a. do while total > 0
b. do while total = 0
c. do while total < 0
d. do while total >= 0
1.2 Study the following series: 3; 6; 10; 15; 21; . . .
The next element in the series is
a. 26
b. 28
c. 30
d. 32
1.3 In order for students to qualify for the next module they need to pass one of the two assessments. Which operator will be correct to test these conditions in a do while loop.
a. AND
b. OR
c. NOT
d. Any logical operators as they have the same order of precedence
1.1 Which of the following statements is true with regards to the post-test loop?
a. The statement in the body of the loop must be processed at least once.
b. It is not known how many times the body of the statement must be processed.
c. The condition controlling the loop can be tested at the end of body of the statements
d. All of the above
1.2 Which of the following is not true with regards to the pre-test loop?
a. It is possible that the statement inside the body of the pre-test will not execute at all.
b. It is always known how many times the statements inside the body will execute.
c. A sentinel may be used to control the execution of the loop.
d. Once a while loop is entered, the statements within the compound statement are executed as long as the tested condition is true.
Let b is a real number. Let n be a non -negative integer. Assume b and n are not
simultaneously 0. Write iterative and recursive functions that return value of b n, the nth power of b
Create a flowchart that will able to read the age of an individual and determine if it qualified to vote or not. The qualifying age to vote is 18 and above. If the age is 18 below, display "too young!". Note that there is no such age as 0 or negative however display "Invalid age" if age is above 100 display "Out of range".
Write a C code to add two polynomials having five numbers of unknown variables