A contractor charges for wood flooring based on the amount of flooring to be installed. Total flooring under 200 square feet is $10/sq ft, flooring measuring 200-1000 square feet is $7/sq ft and anything over 1000 square feet is $5/sq ft. Write conditional statements to determine the appropriate outcome.
Q: Write an if statement for the following: use if/else statement that assigns 0.10 to commission…
A: #include<stdio.h> int main() { float sales, commission; printf("Enter sales : "); scanf("%f",…
Q: Write an if-else statement that works like this: If the sales variable is greaterthan or equal-to…
A: Given: if-else statement where the sales variable is greater than or equal-to 50,000, the…
Q: Write an if-else statement that works like this: If the sales variable is greater- than or equal-to…
A: “if-else” statement: The following is the “if” statement to assign 0.2 to the variable…
Q: Use the "if-else if" to design, develop and test a program that calculates and displays the speeding…
A: Kindly Note: As per our guidelines we are supposed to answer only first question. Kindly repost…
Q: rite an if/else statement that compares the value of two variables, lastYrTaxes and estimatedTaxes,…
A: if (lastYrTaxes < estimatedTaxes) { oweMoney = true; } else { oweMoney = false; }
Q: Write the conditional statement in its equivalent disjunctive form
A: Let p= she were tall q = she would be on the volleyball team conditional statement: p -> q which…
Q: A programmer wants to determine whether a score is within 10 points of a given target. For example,…
A: Answer is option D (target-10 ≤ score) AND (score ≤ target +10 )
Q: Write a program that determine the bonus amount using a nested if-else statements . For hourly…
A: As no programming language is mentioned, it is solved using basic C++
Q: The local gas station runs a promotion on Wednesdays for 10 cents off the price of gas all day.…
A: Conditional Statements are used to check conditions and perform specific actions. If the condition…
Q: Write the following statement in symbolic form: If I will go to college then I will get a job, if…
A: Let "go to college" is P "not go to college" is ~p " get a job" is q "not get a job" is ~q…
Q: Write an if statement that increases pay by 3% if score is greater than 90, otherwise it increases…
A: If statement according to the need of yours is given below:
Q: Write if-else if statements that will compare "price" variable with below values and output…
A: NOTE: Programming language is not mentioned, so doing in C++ In this question, we are asked to write…
Q: python programming write an if-else statement that compares the age variable with the value 65.…
A: Algorithm to check whether age is greater than 65 or not Take input as age and initialize…
Q: why my conditional operator isn't working here.
A: In the given conditional statements, == operator checks for reference to the string object, not for…
Q: A program calculates the total salary of an employee with the condition that if the working hours…
A: Given:
Q: A student makes the following argument. if I receive a good grade, the instructor teaches well. I…
A: Here we need to create a statement by taking reference from given data.
Q: suppose the statement "if the square is blue, then the triangle is green" is true. Classify each…
A: The question is on finding the given statements are true or false.
Q: Write a program that determine the bonus amount using a nested if-else statements . For hourly…
A: Start Input type If employee is hourly based Input working hours If hours more than 40, bonus is…
Q: Rewrite the following statement using the ternary conditional operator (? :): if (i < 10) {…
A: Rewriting the following statement using the ternary conditional operator(? :) is: j = ( i < 10 )?…
Q: Suppose that you have the following conditional expression. (Assume that all the variables are…
A: a. Value of “fertilizingCharges”: The value of “fertilizingCharges” when the value of “backyard” is…
Q: Write an equivalent if...else if...else statement to replace the following switch statement int…
A: 1) In if...else if...else statement, if statements are executed from the top down. As soon as one…
Q: Write a conditional structure that will do the following: 1. Test whether x and y are equal. 2. If…
A: To write a conditional structure in C++ to perform the following task: To test whether x and y are…
Q: Write an if-else statement that outputs the word “Emergency” provided the valueof the variable…
A: By taking input from user, writing if-else statement according to the requirement of question. Using…
Q: //a statement that test of the gender is f, thus sets maternity_leave identifier to true;
A: Dear Student, The asked statement is given below -
Q: Write if statements for each of the following. Possible outcomes are underlined. The if statements…
A: Note: Possible outcomes is not underlined. for last part is not clear[it look incomplete] 1.…
Q: Rewrite the following statement using the ternary conditional operator (? :): if (i< 10) { j= 8; }…
A: ternary operators have three operands. It can be used to replace multiple lines of code with a…
Q: QUESTION 8 Write an if/else statement that compares the value of two variables, lastYrTaxes and…
A: Given:
Q: classified in one of the three categories (A,B,C). Write a Python program using chained conditional…
A: Given to write python code for updated balance below is the code for that
Q: Rewrite the following conditional expressions using if-else statements: a. score = x > 10 ? 3 *…
A: Rewrite the following conditional expressions using if-else statements: a. score = x > 10 ? 3 *…
Q: Write an efficient if statement to assign x the value 1 if x ≤ 1.5, 2 if 1.5 <x < 2.5, and 3…
A: The above question is solved in step 2 and step 3 :-
Q: if (a > 0) if (b 5) x - x + 4; else x - x + 3; else x -x + 2; « is currently 0, a is 1 and b is -1,…
A: Here in this question we have given a Java code and we have asked to find the final value of x after…
Q: Rewrite the following if statements using the conditional if (age >= 16) ticketPrice = 20; else…
A: Rewriting if statement The code is //Definition for class Test public class…
Q: Using the following chart, write if/else if statements to calculate the commission based on the…
A: Use the else if statement to specify a new condition if the first condition is false. Syntax if…
Q: Working overtime is defined as having worked more than 40 hours during the week. Given the…
A: As per the given question, we need to write an expression that evaluates to true if the employee…
Q: ents. If car_year is 1969 or earlier, print "Few safety features." If 1970 or later, print "Probably…
A: Use python 3.5 or 3.6 The given code should be intended as given in the above screenshot: car_year =…
Q: Write out an IF-THEN-ELSE statement for the following conditions: 1. A person has credit card points…
A: Let's understand step by step : Answer (1) : 1. The Points_available will be the integer variable…
Q: QUESTION 8 Write an if/else statement that compares the value of two variables, lastYrTaxes and…
A: The question is on: writing the code in java with respect to the given question.
Q: Using the following chart, write an if-else-if statement that assigns: S, M, L, depending on the…
A: Use the following if-else-if statement that assigns: S, M, L to Size variable depending on the…
Q: The following statements are intended to alert a user to dangerously high oral thermometer readings…
A: Matlab: Matlab stands for MATrix LABoratory. The purpose of MATLAB is used to perform engineering…
Q: Write an if statement that performs the following logic: if the value of variable price is greater…
A: If statement If the statement is intended to change the course of action.The syntax of the statement…
Q: Write the conditional statement in its equivalent disjunctive form. If she were tall, she would be…
A: Here the condition statement is in form of p -> q The disjunctive form would be ~p v q
Q: Convert the following FOL statement to English 3 x student(x) and (not learn(x, German) V not…
A: ∃ x student(x) : There exists some x who is a student not learn (x , German) : x does not learn…
Q: the statement that is equivalent to the following conditional
A: Solution - In the given question, we have to find the statement that is equivalent to the following…
Q: Write an if/else if statement that performs the same actions as in the above question when the value…
A: Given: Write an if/else if statement that performs the same actions as in the above question when…
Q: Write a program that reads the temperature and unit from the user and prints a message indicating if…
A: In C Programming, When an if else statement is present inside the body of another “if” or “else”…
Q: a. Assuming that x is 1, show the result of the following Boolean expressions.(true) && (3…
A: a. The result for the following Boolean expressions:Assuming x = 1(true) && (3 > 4)3 is…
Q: Write a program using if, elif and else statements that ask the user for 4 numbers and then tells…
A: Write a C++ Program that will only use if-else conditions and find the biggest number among the 4…
Q: e a statement using a conditional operator to do the following: if x is less…
A: 1. conditional operator in c int x,y,z; z = (x<y)? 20 : 0; Explanation if(x<y) { z=20; } else…
A contractor charges for wood flooring based on the amount of flooring to be installed. Total flooring under 200 square feet is $10/sq ft, flooring measuring 200-1000 square feet is $7/sq ft and anything over 1000 square feet is $5/sq ft. Write conditional statements to determine the appropriate outcome.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Write an if-else statement that works like this: If the sales variable is greater- than or equal-to 50,000, the commissionRate variable should be assigned the value 0.2. Otherwise, the commissionRate variable should be assigned the value 0.1.Write an if-else statement that works like this: If the sales variable is greaterthan or equal-to 50,000, the commissionRate variable should be assigned the value 0.2. Otherwise, the commissionRate variable should be assigned the value 0.1.Rewrite the following expressions using the conditional operator. (Assume that all variables are declared properly.)a. if (x == y)z = x + y;elsez = (x + y) / 2;b. if (hours >= 40.0)wages = 40 * 7.50 + 1.5 * 7.5 * (hours - 40);elsewages = hours * 7.50;c. if (loanAmount >= 200000)closingCosts = 10000;elseclosingCosts = 8000;
- Write if statements for each of the following. Possible outcomes are underlined. The if statements must contain the outcomes exactly as written below. a little cold if the temperature is less than 60, nice weather $1 if the number of cents is a 100. player wins if player earns at least 20 points, player loses 10% discount if total amount due is $100-$200 (including 100 and 200). free for children 2 and younger or adults 65 and older; $5Rewrite the following if statements using the conditional if (age >= 16) ticketPrice = 20; else ticketPrice = 10;.Write the conditional statement in its equivalent disjunctive form. If she were tall, she would be on the volleyball team
- The local gas station runs a promotion on Wednesdays for 10 cents off the price of gas all day. Write a conditional statement to determine if 10 cents off.Implement the following decision table using a nested if statement and multiple alternatives if statement. Assume that the grade point average is within the range 0.0 through 4.0. Do not write entire program. Mention only the required variables and the nested if statement. grade point average transricpt message 0.0-0.99 failed semester - resigister suspended 1.0- 1.99 on probation for next semester 2.0-2.99 (no message) 3.0-3.49 dean's list for semester 3.5-4.00 highest honors for semesterWrite an if statement for the following: use if/else statement that assigns 0.10 to commission unless sales is greater than orequal to 50000, in which case it assigns 0.20 to commission.
- Suppose that you have the following conditional expression. (Assume that all the variables are properly declared.)(0 < backyard && backyard <= 5000) ? fertilizingCharges = 40.00: fertilizingCharges = 40.00 + (backyard - 5000) * 0.01;a. What is the value of fertilizingCharges if the value of backyard is 3000?b. What is the value of fertilizingCharges if the value of backyard is 5000?c. What is the value of fertilizingCharges if the value of backyard is 6500?Write the statement in words if: p: Firemen work hard. q: Firemen wear red suspenders 3) ~p → qWrite out an IF-THEN-ELSE statement for the following conditions: 1. A person has credit card points and if the number of points entered > 4,999 then output “Enough points for Selection” otherwise output “Not Enough points for Selection” using Variable Points Available. 4. A customer is buying a car for $20,000 and wants to upgrade the stereo speakers for an additional $100. However, if the customer gets the extended stereo package for $250 which includes the upgraded speakers, XM radio, and upgraded visual display. Use variables CarPrice, UpgradedSpeakers and ExtendedStereo for the IF statement. Show the calculation for the total cost of the car depending on options selected.