C++ Given int x = 13 and int y = 4 which of the following C++ statements is false? x / y evaluates to 3 x % y evaluates to 1 x / y evaluates to 3.25 None
Q: Write a C program that calculates the power required to accelerate a 900 kg car from a standstill to…
A: Program with commented explanation and output is below.
Q: 1. Make a program that prints "No school!" if temperature is below 10 degrees. 2. Make a program…
A: /*Program that prints "No School" if temperature is below 10 degree*/ #include <stdio.h>…
Q: Make a program that gives a discount of 100 pesos to a customer if the shirt bought is XL and the…
A: Write a C program that will calculate the discount according to the following conditions: Discount =…
Q: The factorial of a number n can be estimated using the following formula: n!= /2xT xn x Where…
A: The below points are followed to write the program with the given description: Include following…
Q: WRITE A C PROGRAM: A particular type of packing carton costs P2.50 per square foot at the bottom and…
A: The program is written in C. Please find the program in below step.
Q: 1) If x = 5, y = 6, z = 4, and w = 3.5, evaluate each of the following statements, if possible. If…
A: Note: Here you asked four different questions so I'm going to answer the first question only.…
Q: write a c program to Calculate the mass of air in an automobile tire using following formula…
A: Algorithm Start Var p, v, m, t Accept p, v, t from user m=p*v/(0.37*(t+460)) Print(m) Stop
Q: Make a program that prints "too cold" if temperature is below 50 degrees, "OK" if the temperature is…
A: I have provided code with output in C language below.
Q: Write a complete C program for the following problem situation. Calculate the mass of air in an…
A: Given formula is PV= 0.37 m (T+ 460) To find mass m PV0.37= m (T+ 460) m = PV0.37(T+460) C code:…
Q: Make a program that prints "warm" if temperature is above 50 degrees and prints "cold" otherwise.
A: Input will be the temperature Based on the condition, we display respective statement about the…
Q: Make a program that gives a discount of 100 pesos to a customer if the shirt bought is XL and the…
A: given, there are two conditions given (I) if shirt is XL and price> 500 then give a discount of…
Q: Constraints 1 ≤ N ≤ 5000 1 ≤ M ≤ 10 1 ≤ Si ≤ 20 Output Format For each test case, output a…
A: I have solved this question in c++ and java also for better understanding
Q: Make a program that asks the user for the hours worked for the week and the hourly rate. The basic…
A: The inputs will be hourly rate and hours The output will be basic salary, bonus, total salary
Q: Using python programming, create a simple calculator for 2 numbers. a. answer should be 2 decimal…
A: Code: print("Select…
Q: Good day Ma'am/Sir... please do me a favor on making a C PROGRAMMING ONLY (please don't use C+ or…
A: #include <stdio.h>int main() { int temp; printf("Enter temperature: ");…
Q: 1. What is the value of x after each of these statements is encountered in a computer program, if x…
A: The if clause is used to check a condition and perform some operation if the condition evaluates to…
Q: Write a c++/c program that asks the user to enter the size of the side of lot1 and base and height…
A: Step1: Program: //header files #include<iostream> #include<conio.h> //main body int…
Q: Write a C program that takes as input a temperature and temperature type (either Fahrenheit or…
A: In this program, we will take 2 user inputs. One for the value of temperature and one for its unit.…
Q: The slope m of a straight line that passes through two points P1(x1, y1) and P2(x2, y2) is…
A: Algorithm : main function() Step 1 : declaring a variable of type ifstream. Step 2 : using the…
Q: Calculate the tax due or the refund for a family based on the following imaginary formula. 1. For…
A: I have given a C program for the given questions using conditional statements.
Q: Make a program that prints "No school!" if temperature is below 10 degrees.
A: Algorithm: 1. Start. 2. Read temperature in degrees as temp. 3. IF temp < 10 THEN: Print…
Q: Write a C++ program that reads in temperature in Celsius and displays temperature in Fahrenheit;…
A: The below is a temperature conversion formula that converts celsius to fahrenheit is as follows…
Q: 50. The expression 2**2**3 is evaluates as: (2**2)**3. State whether this statement is true or…
A: Please find the answer to the above question below:
Q: Need a C++ program where a user can input his weight and height and the program suggests him a…
A: Actually, c++ is a powerful general programming language.
Q: /*This is a C++ Program. Declare a variable c1 of type float. Then initialize it to 3.75.*/
A: Dear learner , hope you are doing well , I will try my best to answer this question. Thank You!!
Q: Create a c++ divisibility test program. The program will ask for an integer value then the system…
A: The program will prints the numbers based in the integer value given by the user which are divisible…
Q: 6. Make a program segment that will ask the user if he wants to compute the perimeter of the area of…
A: The c program is given below.
Q: t for the store. She would like to know how much the merchandise should be marked up so that after…
A:
Q: Make a program that accepts three numbers from the user and displays the values from lowest to…
A: We need to provide c code for printing number from lowest to highest values.
Q: /* Calculate the tax due or the refund for a family based on the following imaginary formula. 1. For…
A: First, we will input the taxable amount from the user. Now based on the data given in the table. We…
Q: (x >19 && x < 99) is a conditional statement in C++ to check if x is between 19 and 99. True…
A: Required: (x >19 && x < 99) is a conditional statement in C++ to check if x is…
Q: The factorial of a number n can be estimated using the following formula: n!= V2x 7xn x Where…
A: Programming instructions: Include necessary header files. Declare function. Create a global…
Q: Create a c++ program flowchart and algorithm, that will input for the value of N and M, get the sum…
A: Algorithm: Step 1: Start Step 2: Initialize sum=0 Step 3: Take two inputs (N and M) from the user.…
Q: ++ program of A man wishes to fence a field in the form of a triangle. If one angle of the triangle…
A: As hypotenuse is given, we will find rest two sides with given angle. Let the sides be x and y. x =…
Q: 4. Make a program that accepts two numbers and ask choice of operation as M, D, A, or S. Compute the…
A: Take a input of two numbers Read the two numbers Using conditional statements perform the required…
Q: / * Calculate the tax due or the refund for a family based on the following imaginary formula. 1.…
A: The question is to write C code for the given problem.
Q: Using c++ write a program A certain grade of steel is graded according to the following condition:…
A: #include <iostream>#include <cmath>#include <iomanip>#include<string>using…
Q: Make a program that asks the user for the hours worked for the week and the hourly rate. The basic…
A: Start Input hours worked Input hourly rate Calculate Basic Salary If hours worked>45 Then bonus…
Q: write a c++ program to display a calendar for a given year Ask a user to enter the year and the new…
A: Program description: The c++ calender.cpp program that prompts user to enter the year and the…
Q: 2. Make a program that prints "warm" if temperature is above 50 degrees and prints "cold" otherwise.
A: C program for above : #include <stdio.h> int main() { //get the temperature from…
Q: Make a program segment that will ask the user if he wants to compute the perimeter of the area of a…
A: Algorithm : Step 1 : declare variable. Step 2 : print the menu. Step 3 : ask for the choice from…
Q: 1. Make a program that prints "No school!" if temperature is below 10 degrees. 2. Make a program…
A:
Q: Write a C++ program to find the biggest of three numbers using conditional operator. Note: Attach…
A: 1. Taking firstnumber, secondnumber and thirdnumber and assigning the value in these variables. 2.…
Q: 4. Make a program that accepts two numbers and ask choice of operation as M, D, A, or S. Compute the…
A: Given : Design a c program where 2 numbers are taken as input. take choice from user as M,D,A,S and…
Q: Make a program that gives a discount of 100 pesos to a customer if the shirt bought is XL and the…
A: Ask the user to enter the size and price. if Price>=500 and size == 'XL' discount=100;…
Q: Write a C++ program to calculate the telephone bill. The calling rates per minute are as follows: If…
A: Algorithm: Begin READ Minutes IF Minutes<=600: billAmount=Minutes*2ELSE:…
Q: There are a total of 30 chickens and rabbits in a coop. The total number of feet of chickens and…
A: Answer is given in step2.
Q: Paul is a tourist from Germany. He is now in Jordan to visit Petra (one of the seventh wonders in…
A: #include <iostream>using namespace std;// 1 jod = 1.18 euro// 1 euro = 0.85 jod int main(){…
Q: Write program in C++ that 10 computes the following: y=1+1/x + 2/x^2 + 3/x^3 +...........+ n/x^n
A: Here I have taken input from the user for the value of x and n. Then I have used for loop to…
Q: I need a C++ program that does the following: A carpet company has determined that every 50 square…
A: #include<iostream> using namespace std; bool inputValidate(double); void getInfo(double&,…
C++
Given int x = 13 and int y = 4 which of the following C++ statements is false?
x / y evaluates to 3 |
||
x % y evaluates to 1 |
||
x / y evaluates to 3.25 |
||
None |
Step by step
Solved in 2 steps
- Which of the following are correct C++ statements? (10) cout "Programming with C++!" endl; cout " Programming " " with " " C++" endl; cout " Programming" " with C++!" '\n'; cout "Programming with C++!' endl;xyz is a telecom company,there are three recharge plans as listed below- 10$ - 50 Gb for 28 days 20$ - 150 Gb for 56 days 40$ - 350 Gb for 84 days write a program in c++ to ask user to which plans does he wants and display the cost of that recharge plan.Consider the following C program snippet. (Assume rest of the code is correct) char arr[] = {'B', 'o', 'b', '\0'};char* str = arr; Which of the following statements are true?Choose ONLY the correct options (one or more). Question 12 options: The behaviour of this code is undefined. if(arr==str)will not pass the condition check strcmp(arr, str) will return 0. strcmp(arr, str) will return 1. if(arr==str)will pass the condition check
- In Python Which of the following statements will execute if given x=2 and name = "? a. if x-2: b. if name : c. if False: d. if x:(C PROGRAMMING ONLY) 6. Deal or No Deal?by CodeChum Admin When I was a kid, I used to watch this TV game show, Deal or No Deal? In the game, there are different brief cases, each labeled with a number. Inside each brief case is an amount in Pesos and the goal is to guess which briefcase contains the smallest amount. In this program, instead of just finding the smallest amount, your task is to ask the user for an integer input and print the values in the array smaller than the inputted integer. Instructions: In the code editor, you are provided with an array with 100 elements.Your task is to ask the user for an integer input and then print all the elements in the array whose value is lesser than the inputted integer.Input 1. Inputted integer Output Enter value: 6132450351503022244Turbo C programming if (X>20&&90) - - - Line 1 { if (X>50) { printf("Who? "); } else { printf("What? "); } } else { printf("Where"); } If one of the condition in line 1 is false, What statement will be performed next?
- 1) Write a c++ program that calculates the cost of 3 bags of fruit. The 4 possible fruits arepears which cost 1 dollar each, pomegranites which cost 2 dollars each, plumbs whichcost 3 dollars each, and bananas which cost 5 dollars each. Each bag can contain anynumber of different fruits with any quantity of each particular fruit. The program willprompt the user to enter a particular fruit by typing the name of the fruit: .‘pear’ forpears, ‘pomegranite” for pomegranites, ‘plumb’ for plumbs, and ‘banana” for bananas,and then prompt for the quantity of that fruit that will be placed in the bag. The programwill then continue to prompt the user in the same manner for more fruit to be placed inthe same bag until the user types the word ‘done’. This will then cause the program tohave the user enter the various quantities of fruit for the next bag. When the user hasentered the varieties of fruit in all 3 bags, the program will display the total cost of fruitper bag and the overall cost for all…Q.3 Write a C++ program that calculates the volume of a solid cone. The formula is: volume = ((0 radius20 height)/3 Input the values of height and radius.C++ Programming Exercise: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: a. The total number of of units. b. The rent to occupy all the units. c. The increase in rent that results in a vacant unit. d. Amount to maintain a rented unit. The program then outputs the number of units to be rented to maximize the profit.
- Write a C++ program to display the table given below. Use manipulator functions. You need to apply the formula for calculating percentage value as shown in the table. Also check which student got the lowest percentage among all. All marks and percentages need to be stored in separate variables.I need a C++ program that does the following: A carpet company has determined that every 50 square feet of floor coverage will require 6 hours of labor. The company charges $30 per hour for labor. The program should ask for the number of rooms to be carpeted and the price of the carpet per square foot. Write a program that uses this method to calculate the total cost: int getArea ( ) should ask for the square feet of floor space in each room, validate it, and return it the value main. This function should be called by main once for each one of the rooms. Display the area to be carpeted, the cost of the carpet, and the cost of labor, and the total cost to the customer. Input Validation: Do not accept a negative value for any data element./*This is a C++ Program. Declare a variable c1 of type float. Then initialize it to 3.75.*/ /* If you can answer this in x code format that would be great! */