tion 3: Choose the correct answer for h of the following questions:
Q: felh (Business: check ISBN-10) Question 1a An ISBN-10 (Intermational Standard Book Number) consists…
A: Take the input as ISBN number Genarate the output It is 10 string length of ISBN number
Q: Although the following code segments are syntactically correct, each containsan error. Locate the…
A: Given: Although the following code segments are syntactically correct, each containsan error.…
Q: Assume that start and end are integers. Return the average all of the numbers from start to end…
A: def average(start,end): avg = (start+end)/2.0 return avg x = average(3,5)print('The average is…
Q: if (a > 0) b3а +10; else b%3а -10;
A: Below is the equivalent MIPS assembly language for the given c fragments. MIPS stands for…
Q: a) if ( age >= 65); puts( "Age is greater than or equal to 65"); else puts( "Age is less than 65" );…
A: Given: To find error in given C codes.
Q: The company discounted used cars pays their employees according to this chart: 250$ per months plus…
A: given: salary is according to this: 250$ per months plus 50$ per car sold if sales> 10, bonus 5%…
Q: Enter the meal charge: 53.60 For a meal costing $53.60. The total tax is $3.62, tip $10.72, and…
A: Given: As per the given output, I am given a solution in the c++ program and shown the output in…
Q: Q3/estimate the results when you execute the following code: x-1 Z=1 tl=x+y*z
A: Operators precedence: Highest: ^ Lower: *, /, % Lowest: +, -
Q: Ineed help to create a nested formula in cell B17 with the IF and SUM functions that check if the…
A: For the solution of this inquiry let us take an example of relevant datasheet as below : Suppose…
Q: Writer C# program in which accept number from the user between 1 to 7 and display corresponding days…
A: 1) Below is program in which accept number from the user between 1 to 7 and display corresponding…
Q: QUESTION 14 x, y = 0, 5 Evaluate the result of the following statement: x != 0 O True False
A: Note: According to the BNED Guidelines, only one question can be answered at a time. Please…
Q: 24. If a logical expression is true, it will always return a logical 1 and if it's false, it'll…
A: In this question, we are asked to tick a answer in a True/False format of boolean expressions type.…
Q: Floor division of two decimal numbers will give answer as decimal number? True or False
A: The division of two decimal number will also give a decimal number. When we devide a number 36.2 by…
Q: Print "user_num1 is negative." if user_num1 is less than 0. End with newline. Assign user_num2 with…
A: logic:- read first number if number1<0 display number1 is less than 0 read second number if…
Q: Select all of the following statements that are true. You must select all of the correct answers to…
A: Solution: Given,
Q: 13) Create a Nested IF Function to calculate the Grades. Use the following Information; 1. If the…
A: The IF function in Spreadsheet (MS Excel) is a built-in logical function. This function can be used…
Q: alate the value of
A: The big-O notation is a type of asymptotic notation that is used to describe the order of growth of…
Q: Use the SUMIF function when you want to: Display the sum of a range only if the answer is a positive…
A: According to the information given: We have SUMIF As we use SUMIF in Microsoft excel According to…
Q: Floor division of two integer numbers will give answer as integer number? True or false
A: Floor division of two integers always result in giving a final integer, as per the syntax of the…
Q: S1, ifn 1. T(n) = Fill in the blank next to each statement below with Tif the statement is True. or…
A: Here in this question we have given a recurrance relation and we have asked to some of the…
Q: int z = 2.2; %3D if(x 3) z = X + y; if(z > -1){ cout <« "z is " + y; } else cout <« "z is + z;
A: int z = 2.2 would result in z = 2 as decimal would be ignored. And instead of + I am taking <<…
Q: Complete the code based on the question giv
A: given following code:
Q: Logical table: Write the truth value of the following logical statements X= 127; 127 (Y==X &&…
A: Given X=127 Y=127
Q: QUADRATIC EQUATION This will solve a quadratic equation in the form: Ax^2 + Bx + c = 0 Enter A: 1…
A: C++ program to solve the given problem is below.
Q: Choose the correct answer: the following operators from lowest to highest A\ * , ^ , ( ) B\ ^ , *…
A: Step 1:- Given:- Choose the correct answer: the following operators from lowest to highest A\ * , ^…
Q: Exclusive-NOR performs the following Boolean operation: xy + x'y'.
A: Yes, Exclusive-NOR performs the given Boolean operation: xy + x'y'
Q: rite code else thumbs down! Prefer equation
A: MATLAB CODE: f=@(t,x)[-42.3729*x(1);x(3);-.7670*x(1)-.0012*x(2)];tspan=[0,100];%time…
Q: Question 8 Glven p=T and q=F. Find the truth value of the following expression: [pA(¬p → q)]→ ¬p O…
A: As given, we need to find out the truth value of the given expression - [¬p∧(¬p→q)]→¬p, where p=F…
Q: QUESTION 25 Write conditional expression(ternary operator) that returns -1 or 1 randomly.
A: #include <iostream> using namespace std; int main(){ int max; max = 1000; //set the upper…
Q: Algo Question2_6 Begin i,j,nb : integer nb <- 0 Pour i = 0 to 2 Pour j = 1 to 3 nb <- nb…
A: I have converted Algo Question2_6 to python language to get output you can find value of cell(1,1)…
Q: Print "userNum1 is negative." if userNum1 is less than 0. End with newline. Assign userNum2 with 1…
A: #include <iostream>using namespace std;int main() {int userNum1;int userNum2;cin >>…
Q: SLOPE A LINE This will determine the slope of a linear equation in the form: ax + by = c Enter a: 3…
A: First, input the value of a, b, c. As we know that y = mx + c where m gives the value of slope.…
Q: Identify the regular expression for the following: 1 start 91 93 0,1
A: In this question, we are going to find out the regular expression for the given finite automata.…
Q: Q3/estimate the results when you execute the following code: x=1 y-l Z=1 tl=x+y*z
A: Answer:
Q: Q5: Develop a program using If-else statement that takes obtained marks from user for five (5)…
A: PROGRAM CODE: #include <iostream> // include header file for input output…
Q: If a=[3 5 7 9], then a(4, end) is: * 9 Οι Ο 5 Ο 3 Ο other: Ο Ο Ο Ο
A: Other is correct which is error out of bound Explanation Because when we are writing a(4, end) it…
Q: What will the following code do? A = 50 if(A<99) clc A; end
A: Given code: a = 50;if(a<99) clc a;end; this code will assign 50 to a and if the value of a…
Q: rm the following: Ask the first name, middle initial and last name of the student. Prompt the user…
A: Implementation: import java.util.*;public class Main{ public static void main(String[] args) {…
Q: int x = 5, y = 2, z = 3; if ( x z) cout 2 ) { cout << z <<" "<< y-x << endl; cout << z * (x + y)<<…
A: The program is written in C++ Language. Please find the source code and output in the below steps
Q: QUESTION 2 Create a program that will assist a user in determining the following criteria of a…
A: To write C++ program to find square, square root and check whether the given number is even or odd.
Q: Calculate f(x) using if statement where f(x) -2x when x<O, f(x) = x(x-2) when x is in [O, * .2]
A: Here no language is mentioned so, I have provided c++ code for the given problem.
Q: . Generates a random integer that can be either 15, 16, 17, or 18. (Use the randi or rand function…
A: vInitial=randi(15, 16,17,18) for i=1:30 c=0; for j=1:20 if rem(vInitial(j),2) ~=0…
Q: The strict equal operator is Select one: a.!= b.== d.=
A: Option (b)is correct option.
Q: Generate any random number between 1 and 10 by using Random Function then guess that number in…
A: As no programming language is mention. So i am using python to code.
Q: Given c = True , d = False. Determine if the following condition is true or false: !d && C True…
A: Given: c = True d = False Statement: !d && c
Q: QUESTION 5 The result of the following expression 2*3+5/4"(2+1) is O a.9 Ob.7 Oc.0 Od8 Od.8
A: I have used Python 3 to get the result.
Q: Assignment or equal operator is used for comparing two values Select one: True False When you want…
A: 1) Answer: True Explanation: Assignment or equal operator like =,<,> is used for the 2 number…
Q: SOLVE IN C# Canada Government has announced 250 immigration visa lottery for third world countries.…
A: Lets analyze what information is provided to us and what is expected out of it. Programming language…
Q: QUESTION 30 for letter in 'another'[3:6]: print(letter, end=' ')' th Othe other ther
A: According to the Question below the Solution:
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Step by step
Solved in 2 steps
- Q1) How to write a C program segment that prompts and accepts the age and number of hours the customer has spent in the “FUNNY Theme Park”. Then, displays the charges based on the rates shown in Figure 2 below : Age Range Rate ( per hour) (RM)0-20 1.0021-50 3.50Above 50 2.00 In your program, you have to make use of THREE(3) different defined constants for the value of rate per hour and declare the necessary variables.Q1) How to use C code to write a C program segment that prompts and accepts the age and number of hours the customer has spent in the “FUNNY Theme Park”. Then, displays the charges based on the rates shown in Figure 2 below : Age Range Rate ( per hour)(RM)0-20 1.0021-50 3.50Above 50 2.00 (Figure 2) In your program, you have to make use of THREE(3) different defined constants for the value of rate per hour and declare the necessary variables.PLS DO FAST WITHIN 10 MIN . I WILL GIVE YOU 3 LIKE FOR SURE .. SOLUTION MUST BE IN TYPED FORM >> C code please according to instructions. ONLY C code. << Q1. Write a C function with the following prototype: void spacesToXs(char *s) This function replaces ALL space characters in the string 's' with the character 'X' (capital X). See the examples below: original string: altered string: "j a w s" "jXaXwXs" " " "XXXX" "are you ok X?" "areXyouXokXX?" Q2. Write a C function with the following prototype: unsigned int howManyVowels(const char *s) That determines how many vowels (alphabetic letters 'a', 'e', 'i', 'o', or 'u') UPPER or lowercase are contained in the string 's'. Once complete, the function returns the total number of vowels found or the value 0 if no vowels are found. For example, string: return value: "123-xyz" 0 "This is PRG355@SENECA" 5…
- (Data processing) Years that are evenly divisible by 400 or are evenly divisible by 4 but not by 100 are leap years. For example, because 1600 is evenly divisible by 400, 1600 was a leap year. Similarly, because 1988 is evenly divisible by 4 but not by 100, it was also a leap year. Using this information, write a C++ program that accepts the year as user input, determines whether the year is a leap year, and displays a message telling the user whether the entered year is or is not a leap year.Numerical analysis) Given a number, n, and an approximation for its square root, a closer approximation of the actual square root can be found by using this formula: newapproximation=(n/previousapproximation)+previousapproximation2 Using this information, write a C++ program that prompts the user for a number and an initial guess at its square root. Using this input data, your program should calculate an approximation of the square root that’s accurate to 0.00001. (Hint: Stop the loop when the difference between the two approximations is less than 0.00001.)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;
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }(Hydraulics) a. Write, compile, and run a C++ program to calculate the horizontal force exerted on the T-connector pipe shown in Figure 2.16 when the mass flow rate is 1.5 kg/s, and the fluid’s velocity entering the T-connector is 3 m/s. The formula for determining this force is as follows: Fh=MfvFhisthehorizontalforce(N).Mfisthemassflowrate( kg/s).visthevelocity( m/s)ofthefluidenteringthepipe. Your program should produce the following display (replacing the xxxx with the actual force value your program calculates): The horizontal force, in Newtons, is xxxx b. Manually check the values computed by your program. After verifying that your program is working correctly, modify it to calculate the force exerted when the mass flow rate is 2.3 kg/s, and the velocity of the fluid entering the pipe is 4.25 m/s.Question 4 Write a C statement that multiply x by 3.5 without using multiplication (*) or division (/) operators. Full explain this question and text typing work only thanks
- XYZ Telegram Company charges P18.50 for a telegram that do not exceed 12 words and P1.50 for every succeeding word, plus P5.00 service charge if type of delivery is special. Create a C++ program that accepts the number of words in a telegram and the type of delivery ‘S’ for special if the customer desires for a special delivery. Compute and display the customer’s charge.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 checkThis question is c programing question. Please use the functions for solving. Code the C program that prints the longest and shortest 5 lengths of the students according to the height of a 30-people entered . (This program prints the longest and the shortest 5 height of 30 to the screen.)