c++ programming b) Given x and y are int variables and z is a double variable. The initial value for x, y, and z are 4, 6, and 2.5. Show the working steps and result for the following expression: (i) x / (3 + y) + 11 % y (ii) x - y++ + z
Q: Name two well-known data transfer protocols supported by the Transport Layer. Give a brief descri...
A: The two well-known data transfer protocols supported by the Transport Layer are : TCP , UDP TCP :It ...
Q: Geometry: distance of two points) Write a program that prompts the user to enter two points (x1, y1...
A: C++, programming language can be used to perform the task efficiently. It is a multi purpose, multi ...
Q: Write a program to convert a US Customary System length in miles, yards, feet and inches to a Metric...
A: I give the code in Python along with output and code screenshot
Q: If two switches are setup with distinct VLANs and have an access link between them, Is it possible ...
A: Introduction: For each VLAN, use a router with one router LAN interface linked to the switch.Use a s...
Q: 6. Fill in the Gaps by CodeChum Admin The foundation for our building is slowly collapsing. We need ...
A: The solution to the given problem is below.
Q: Buffers are used between different levels of the memory hierarchy to lessen the latency of accesses ...
A: Introduction: A write buffer is required between the L1 cache and the L2 cache. The purpose of this ...
Q: This is an example of how you can use a foreign key to link two different databases. Is the user req...
A: Privilege of authorization: The Reference privilege type enables the creation of foreign key referen...
Q: Examine the impact of disruptive internet applications on society.
A: Given The effect of disruptive internet applications on society.
Q: What function did we use to display a single row function in database?
A: The solution to the given problem is below.
Q: k will not be effective while using a multilayered defense? What is the reason for this or why is it...
A: given - Are there any guarantees that an attack will not be effective while using a multilayered def...
Q: Describe when you would want to utilize embedded SQL over SQL alone or a general-purpose programming...
A: The question is when to utilize embedded SQL over SQL alone or a general-purpose programming languag...
Q: . Following is the static list of data you need to maintain in the application 1/ Static list of t...
A: The API has been created there but the function is empty you can use that. to run the project do the...
Q: What exactly is an operating system? Name a few popular operating systems.
A: Operating System: The operating system (OS) is a graphical interface that connects a computer user t...
Q: How can one go about importing the turtle module?
A: Introduction: Turtle is a Python package that comes pre-installed that allows users to generate pict...
Q: f a process fails, the error information is often sent to a) a new file, b) another ongoing process,...
A: Intro The question is about If a process fails, the error information is often sent to a) a new file...
Q: vern data link layer sta
A: Below the rules that govern data link layer standards
Q: Capital - Small = ? Code in C language
A: In the count the Capital letter and small letter and difference of that count and print the diffrenc...
Q: What is database management and how does it work
A: In Step 2, I have provided brief explanation about database management system ------------
Q: 3. Write a program called alice_words.py that creates a text file named alice_words.txt containing a...
A: we have provided required code in Python
Q: Discuss relevant cybersecurity issues and how these emerging technologies (AI, analytics, blockchain...
A: BLOCKCHAIN: Blockchain is a system that ensures network security, transparency, and visibility via a...
Q: a) Generate 10,000 random samples of sample size 40 from this population: Use the R command sample (...
A: Algorithm: Start Set n=40 Store a sequence of values from 1-50 in x Declare an empty list named sam...
Q: O Mitigation and Security Control Recommendation: Discuss how you fix this vulnerability. Can you pa...
A: the answer is
Q: ined the best network design to ensure the security of internal access while retaining public websit...
A: Configuring IPv4 Network Network configuration comes in two stages: hardware integration, and then c...
Q: Type the program's output def get_numbers (): user_input = input () values = [] Input for token in u...
A: The answer is
Q: What does a negative cycle on a graph mean? What may be done with a negative cycle graph to discover...
A: A negative cycle is one in which the overall sum of the cycle becomes negative.
Q: Java programming Question. How can i find the reverse the letters present in the user entered String...
A: Required:- Java programming Question.How can I find the reve...
Q: Type the program's output import java.util.Scanner; public class BreakAndContinue { public static vo...
A: As given, we need to find out the output of the given code. Given code - import java.util.Scanner;p...
Q: ne
A: given- clay harden borrowed $25000 from a bank at an interest rate of 9% compounded monthly. The loa...
Q: What exactly is ethical system theory?
A: Intro the question is about What exactly is ethical system theory and here is the solution in the ...
Q: Write about the advantages and disadvantages of artificial intelligence (AI).
A: Introduction: Artificial intelligence (AI) is pushing the boundaries of machine-assisted capabilitie...
Q: take the minimized picture into the center of the original picture
A: Syntax: Icropped = imcropIcropped = imcrop(I)Xcropped = imcrop(X,cmap)___ = imcrop(h)Icropped = imcr...
Q: In shopping for a new house, you must consider several factors. In this problem the initial cost of...
A: #include<iostream> using namespace std; //Function calc accepts three values and calculates th...
Q: There 3 red balls and 2 red balls in an opaque bag where 100 people are sitting. Person 1 picks up a...
A: All calculation and explanation is provided below.
Q: Discuss why many IT professionals may disregard project cost management and how this may impact thei...
A: Intro It is usually discovered that within IT project management the stress on cost accounting is un...
Q: Create a program that calculates the interest on a loan. Console Interest Calculator Enter loan amou...
A: from decimal import Decimal def calculate(): loan_amount = float(input("Enter loan amount: ")) ...
Q: crossover opPe A partial search tree for a two player game is given below. MAX MIN MAX O O O O O O O...
A: Answer the above questions are as follows:
Q: With regard to the following JavaScript program, function main() { function sub1() var x = 10; f...
A: answer is
Q: Using the scenario, produce Design Documentation for Plug-Ins Electronics. Your database design docu...
A: An ER diagram contains entities and attributes. It is used to visually denote the working of a certa...
Q: What exactly is a microcontroller? Its constituents, shown in a tidy figure. Provide citations indic...
A: Intro It is called a integrated circuit which is used in many electronic devices .it is also called ...
Q: Model evaluation Create a predictions variable using your fitted model and the test dataset; call i...
A: code/output :
Q: Help please! I need my code to use an exception handling method to check if the user entered a corre...
A: #include<bits/stdc++.h>using namespace std; // This Function Generate All Possible Word Who Ma...
Q: a) Determine the big theta running time of the method myMethod() by counting the approximate number ...
A: Given:
Q: Write a python program to display the number between 150 to 254 whose sum of digits is even number.
A: Run the loop for i 150 to 254 Assign sum with 0 in every iteration of loop Assign n with i Run an...
Q: In python, create a code that accepts the size of a list as an input (n). It will print out all the ...
A: here in this question we have asked to write a python program which take a list of size n as input a...
Q: Write a program to convert à US length in miles, yards, feet and inches to a Metric System length in...
A: Step-1: StartStep-2: Declare 4 variable miles,yards,feet,inches and Call function input() and go to ...
Q: What is the minimum clock cycle from the times below which will suffice as the clock cycle time to r...
A: A clock cycle is termed as the time required to completely execute a certain instruction by a proces...
Q: Select the correct command, term, or option. This term describes a predesigned file with formatting ...
A:
Q: Describe FOUR(4) possible countermeasures against network scanning.
A: At border routers and firewalls, filter inbound ICMP message types. To effectively map your network,...
Q: Excersize 2: Sketch a schematic of the circuit described by the following VHDL code. Simplify the sc...
A: Actually, given question regarding VHDL code.
Q: calculate the unit roots of those data using R studio. Corn Soybeans 107.3439992 212.1854389...
A: Given The answer is given below.
c++
b) Given x and y are int variables and z is a double variable. The initial value for x, y, and
z are 4, 6, and 2.5. Show the working steps and result for the following expression:
(i) x / (3 + y) + 11 % y
(ii) x - y++ + z
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- 2. For each of the following functions, indicate how much the function's value will change if its argument is increased fourfold. a) log₂n b) √n c) n²An integer is said to be prime if it’s divisible by only 1 and itself. For example, 2, 3,5 and 7 are prime, but 4, 6, 8 and 9 are not.a) Write a function that determines if a number is prime.b) Use this function in a program that determines and prints all the prime numbers between 1and 10,000. c languagetype python program with indentation for: Write a program to calculate the balance and minimum payment for a credit card statement. See Test Case. The finance charge is 1.5% of the old balance. If the new balance is $20 or less, the minimum payment should be the entirenew balance. Otherwise, the minimum payment should be $20 plus 10% of the amountof the new balance above $20. The main function should call three functions—one(multi-valued) for input, one (multi-valued) to calculate the new balance and minimumpayment, and one for output. Hint: Give user input as Enter old balance: ,Enter charges for month: Enter credits: Test case:200150100New balance: $253.00.Minimum payment: $43.30
- (Statics) A beam’s second moment of inertia, also known as its area moment of inertia, is used to determine its resistance to bending and deflection. For a rectangular beam (see Figure 6.6), the second moment of inertia is given by this formula: Ibh3/12 I is the second moment of inertia (m4). b is the base (m). h is the height (m). a. Using this formula, write a function called beamMoment() that accepts two double- precision numbers as parameters (one for the base and one for the height), calculates the corresponding second moment of inertia, and displays the result. b. Include the function written in Exercise 4a in a working program. Make sure your function is called from main(). Test the function by passing various data to it.(Numerical) Heron’s formula for the area, A, of a triangle with sides of length a, b, and c is A=s(sa)(sb)(sc) where s=(a+b+c)2 Write, test, and execute a function that accepts the values of a, b, and c as parameters from a calling function, and then calculates the values of sand[s(sa)(sb)(sc)]. If this quantity is positive, the function calculates A. If the quantity is negative, a, b, and c do not form a triangle, and the function should set A=1. The value of A should be returned by the function.(Civil eng.) Write a C++ program to calculate and display the maximum bending moment, M, of a beam that’s supported on both ends (see Figure 3.8). The formula is M=XW(LX)/L, where X is the distance from the end of the beam that a weight, W, is placed, and L is the beam’s length. You program should produce this display: The maximum bending moment is xxxx.xxxx The xxxx.xxxx denotes placing the calculated value in a field wide enough for four places to the right and left of the decimal point. For your program, assign the values1.2,1.3,and11.2toX,W,andL.
- (Electrical eng.) a. The voltage gain of an amplifier is given by this formula: voltagegain=[275 23 2 +0.5 f 2 ]n f is the frequency in Hz. n is the number of stages in the amplifier. Using this formula, write, compile, and run a C++ program to determine the value of the voltage gain for a four-stage amplifier operating at a frequency of 120 Hz. Your program should produce the following display: At a frequency of xxxxx hertz, the voltage gain is yyyyy Your program should replace xxxxx with the frequency and yyyyy with the voltage gain. b. Manually check the value your program produces. After verifying that your program is working correctly, modify it to determine the voltage gain of a 12-stage amplifier operating at a frequency of 9500 Hz.(Civil eng.) Write an assignment statement to calculate the linear expansion in a steel beam as a function of temperature increase. The formula for linear expansion, l, is as follows: l=l0(1+(TfT0)) l0isthelengthofthebeamattemperatureT0.isthecoefficientoflinearexpansion.Tfisthefinaltemperatureofthebeam.(General math) a. The volume, V, of a cylinder is given by this formula: V=r2L r is the cylinder’s radius, and L is its length. Using this formula, write a C++ function named cylvol() that accepts a cylinder’s radius and length and returns its volume. b. Include the function written in Exercise 5a in a working program. Make sure your function is called from main() and returns a value to main() correctly. Have main() use a cout statement to display the returned value. Test the function by passing various data to it.
- Mark the following statements as true or false: a. To use a predefined function in a program, you need to know only the name of the function and how to use it. (1) b. A value-returning function returns only one value. (2, 3) c. Parameters allow you to use different values each time the function is called. (2, 7, 9) d. When a return statement executes in a user-defined function, the function immediately exits. (3, 4) e. A value-returning function returns only integer values. (4) f. A variable name cannot be passed to a value parameter. (3, 6) g. If a C++ function does not use parameters, parentheses around the empty parameter list are still required. (2, 3, 6) h. In C + + , the names of the corresponding formal and actual parameters must be the same. (3, 4, 6) i. A function that changes the value of a reference parameter also changes the value of the actual parameter. (7) j. Whenever the value of a reference parameter changes, the value of the actual parameter changes. (7) k. In C++, function definitions can be nested; that is, the definition of one function can be enclosed in the body of another function. (9) l. Using global variables in a program is a better programming style than using local variables, because extra variables can be avoided. (10) m. In a program, global constants are as dangerous as global variables. (10) n. The memory for a static variable remains allocated between function calls. (11)(Numerical) Using the srand() and rand() C++ library functions, fill an array of 1000 floating-point numbers with random numbers that have been scaled to the range 1 to 100. Then determine and display the number of random numbers having values between 1 and 50 and the number having values greater than 50. What do you expect the output counts to be?(Conversion) a. Write a C++ program to convert meters to feet. The program should request the starting meter value, the number of conversions to be made, and the increment between metric values. The display should have appropriate headings and list the meters and the corresponding feet value. If the number of iterations is greater than 10, have your program substitute a default increment of 10. Use the relationship that 1 meter = 3.281 feet. b. Run the program written in Exercise 6a on a computer. Verify that your program begins at the correct starting meter value and contains the exact number of conversions specified in your input data. c. Modify the program written in Exercise 6a to request the starting meter value, the ending meter value, and the increment. Instead of the condition checking for a fixed count, the condition checks for the ending meter value. If the number of iterations is greater than 20, have your program substitute a default increment of (ending value - starting value) / 19.
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)