Answers

Answer 1

The C++ code that implements the above program is given below.

How to explain the program

#include <iostream>

#include <cmath>

using namespace std;

int main() {

   double L, E, I, P, W, a, b, c, max_shear, max_bending, max_deflection;

   // Calculate I

   double height, width;

   cout << "Enter the height of the beam cross-section: ";

   cin >> height;

   cout << "Enter the width of the beam cross-section: ";

   cin >> width;

   I = (1.0/12.0)*height*pow(width, 3);

   // Loop for user input

   char input;

   while (cin) {

       cout << "Select an option:\n"

            << "  p: Beam with a point load\n"

            << "  w: Beam with distributed load\n"

            << "  e: Exit the program\n";

       cin >> input;

       if (input == 'p' || input == 'P') {

           cout << "Enter the length of the beam: ";

           cin >> L;

           cout << "Enter the modulus of elasticity of the beam material: ";

           cin >> E;

           cout << "Enter the magnitude of the point load: ";

           cin >> P;

           cout << "Enter the distance from the left end of the beam to the point load: ";

           cin >> a;

           // Calculate max shear,

Learn more about program on;

https://brainly.com/question/26134656

#SPJ1


Related Questions

In September 2015, a federal court considered the copyright claim for “Happy Birthday,” held by Warner/Chappell. “Happy Birthday” had the same melody and similar words as the “Good Morning” song, which was written in 1893 by two sisters. Publication of "Happy Birthday" occurred first in 1911 and it was mentioned at the time that the two songs shared the same tune.


Do you think that the Happy Birthday song deserves copyright protection based on these facts? What about copyright law?


Share the results regarding the outcome of the court case as well, include an opinion on what happened.


Include References

Answers

Answer:yes it is a copy right protection

Explanation:

Because,Happy Birthday” had the same melody and similar words as the “Good Morning” song, which was written in 1893 by two sisters.

Assign numMatches with the number of elements in userValues that equal matchValue. userValues has NUM_VALS elements. Ex: If userValues is {2, 1, 2, 2} and matchValue is 2, then numMatches should be 3.

Your code will be tested with the following values:
matchValue: 2, userValues: {2, 1, 2, 2} (as in the example program above)
matchValue: 0, userValues: {0, 0, 0, 0}
matchValue: 10, userValues: {20, 50, 70, 100}

Answers

This code checks to see if each userValues element matches matchValue by iterating through each one. If that's the case, numMatches is raised by 1.

A property or an array?

The user must have access to a control that allows multiple value selection in order to change the values in an array property. The user-selected values are written to array elements when the form is submitted Values can be entered into an array property using a multiple-selection list box or a collection of checkboxes on a form. Controls are items that show data, make it easier to enter or update data, carry out actions, or allow users to make choices. Controls generally make the form simpler to use.

if (userValues[i] == matchValue) numMatches++; numMatches = 0;  (int i = 0; i NUM_VALS; i++);

To know more about code  visit:-

https://brainly.com/question/17293834

#SPJ1

4.16 LAB: Count characters:

Ex: If the input is:

n Monday
the output is:

1 n
Ex: If the input is:

z Today is Monday
the output is:

0 z's
Ex: If the input is:

n It's a sunny day
the output is:

2 n's
Case matters.

Ex: If the input is:

n Nobody
the output is:

0 n's

c++

Answers

Note that an example C++ code that counts the number of occurrences of a given character in a string:


#include <iostream>

#include <string>

int main() {

 char target_char;

 std::string input_str;

 std::getline(std::cin, input_str);

 std::cin >> target_char;

 int count = 0;

 for (char c : input_str) {

   if (c == target_char) {

     count++;

   }

 }

 std::cout << count << " " << target_char << "'s" << std::endl;

 return 0;

}

What is the explanation for the above response?


This code reads a line of input from the user and a target character to search for.


It then iterates through each character in the input string and increments a counter if the character matches the target character. Finally, it prints out the count and the target character. Note that this code is case-sensitive.

Learn more about characters at:

https://brainly.com/question/14683441

#SPJ1

What was Martin’s problem that was presented to the dragon?

Answers

"Martin and the Dragon" is a children's story by author and illustrator, Stephen W. Huneck.

What happened in the story?

In the story, Martin's problem was that he was very sad and unhappy. He lived in a small village and had no friends or family to spend time with. One day, he decided to go for a walk in the forest where he came across a dragon who asked him what was troubling him. Martin told the dragon about his loneliness and how unhappy he was.

The dragon listened to Martin and offered to help him by becoming his friend. Martin was surprised that a dragon wanted to be his friend, but he agreed to give it a try. The dragon and Martin spent many days together, playing and exploring the forest. Martin's loneliness disappeared, and he became very happy.

In the end, Martin realized that sometimes help comes from unexpected places, and that true friends can come in all shapes and sizes.

Read more about narrations here:

https://brainly.com/question/1934766

#SPJ1

I NEED HELP Felix is going back through an email he wrote and editing it to make it more to the point and to get rid of extra words where they're not needed. What characteristic of effective communication is he working on?

Question 1 options:

conciseness


completeness


correctness


courteousness

Answers

Answer:

it's correctness please mark me as a brainliest

pls asap Casey's teacher needs to give him feedback on his history essay, including about his grammar and spelling. What's the MOST likely way they'll deliver this feedback?

Question 1 options:

by writing comments on his paper


by verbally telling him all the things they found wrong


by creating a memo about the changes


by sending him a text

Answers

The most likely way Casey's teacher will deliver feedback on his history essay, including about his grammar and spelling, is by writing comments on his paper.

Write a short note on grammar.

Grammar refers to the rules and principles that govern the structure and use of language. It encompasses various elements such as syntax, semantics, and morphology, and includes rules related to word order, sentence structure, and punctuation. Proper grammar is important for effective communication as it helps to convey meaning clearly and accurately.

Good grammar is important in both written and spoken communication. In written communication, grammar errors can make text difficult to understand or even change the meaning of a sentence. In spoken communication, grammar errors can make it difficult for listeners to understand what is being said or can make the speaker sound unprofessional.

Grammar is a skill that can be improved through practice and study. There are many resources available for learning and improving grammar, including books, online courses, and tutoring services. Improving grammar can help individuals communicate more effectively in various settings, including academic, professional, and personal contexts.

To learn more about grammar, visit:

https://brainly.com/question/1952321

#SPJ1

Drag the tiles to the correct boxes to complete the pairs.
Match each type of table relationship to its explanation.

Answers

Answer: 1. one to many 2. many to many 3. one to one

Explanation: the third one says not many in any place of the sentence the second says many in both places of the sentence.

Most games have characters that perform actions on the screen. What are these characters called?
Floats
Sprites
Fairies
Or Pixels

Answers

Answer:pixels

Explanation:

its the correct

Other Questions
answering the what, where, when, how, how much and why questions about consumers and their behavior should provide marketers with ________________________. In Claires family, everyone eats dinner by grabbing a plate and moving into the family room and sitting on the couch. Michael grew up in a family where everyone sits at the table and serves themselves. Which represents a family norm? A. Michaels, because it clearly has a tradition. B. Both, because families can have different norms. C. Claires, because Michaels is old-fashioned. D. Neither, because norms exist in society, not families. Write an Algebraic Equation for each problem (include a let statement) and use it to solve the world problemOn number is eight less than five times another. If the the sum of the two numbers is 28, find the two numbers.The smaller number is __.The larger number is __. A government-funded wind-based electric power generation company in the southern part of the country has developed the following estimates (in $1000) for a new turbine farm. The MARR is 10% per year and the project life is 25 years.Benefits: $45,000 in year 0; $29,000 in year 4Government savings: $2,000 in years 1 through 20Cost: $56,000 in year 0Disbenefits: $3000 in years 1 through 10Calculate the PI value. a backbone network is a high-speed network that connects many networks. group of answer choices true false which of the following statements is most true about amalgam (silver and mercury) fillings placed during pregnancy? amalgam fillings are the most appropriate filling type for pregnant women they should be avoided because there are risks associated with placement of all types of fillings, not just amalgam fillings amalgam fillings are safe in pregnancy, but contraindicated in women who are breastfeeding white resin composites are preferred as they are believed to be safe during pregnancy and breastfeeding At a local play, student tickets cost $6 each and adult tickets cost $11 each. If ticket sales were $3,000 for 400 tickets, how many students attended the play? 120 180 220 280 A company's stock price of $20 a share and is expected to pay a year-end dividend of $3 a share.The stock's required rate of return is 20% and the stock's dividend is expected to grow at the same constant rate forever.What is the expected price of the stock 6 years from now? Which of the following is a way to use a plants DNA in forensic science?a.A forensic scientist can use a plants DNA to prove a suspect was in the area of a crime.c.A forensic scientist can add a plants DNA to a DNA sample to make it large enough to test.b.A forensic scientist can use a plants DNA to identify a victims father.d.All of these are ways a forensic scientist can use a plants DNA. What is it called when the government prevents the media from publishing information, rather than punishing it for breaking laws after the fact?a) public libelb) a writ of censorshipc) a prior restraintd) an espionage act What is the origin of the term cell in biology? PLSSS HELP ME ITS DUE TOMORROW!!!!! Ch 15The nurse is admitting the patient to the nursing unit at the hospital. the nurse is concerned that the patient is at risk of deep vein thrombosis because of which of the following risk factors? Select all that apply.A. Pt's advanced ageB. Pt's admitting diagnosis of cancerC. Pt's stated drug allergy to aspirinD. Pt's history of of prior venous thrombosisE. Pt's low protein diet assuming that the clicklistener class implements the actionlistener interface, what statement should be used to complete the following code segment? the huygens probe took numerous pictures as it descended to the surface of saturn's moon titan in 2005. what did the pictures show? which medication would the nurse anticipate incorporating into the plan of care for a patient who is taking aluminum hydrozide and reports constipation legally prescribed limits on the number of terms an elected official can serve. Canada Telecom, a telephone company, is contemplating investing in a project in multimedia applications. The company is currently 30% debt financed. The company's analysts have estimated the project's cash flows but need to determine the project cost of capital. Canada Telecom analysts assess that their new multimedia division has a target debt-to-value ratio of 45%, and a cost of debt of 6.5%. In addition, the risk-free rate is 3%, and market risk premium is 5%. XYZ Co. is a pure play in the multimedia business and is 35% debt financed. Its current equity beta is 1.05. Assume that both Canada Telecom and XYZ have a tax rate of 35%, and a debt beta of 0. (1) Is Canada Telecom's WACC the right discount rate for its new project? Why or why not? (2) Explain why you cannot use XYZ's equity beta (1.05) as a proxy for the equity beta of Canada Telecom's new project. Estimate the new project's equity beta. (3) What is the new project's cost of capital? Based on the text, why is Newton's work considered one ofthe greatest works in the history of science even thoughpeople of his time had problems with his ideas? Useevidence from the text to support your answer. Evaluate how community respond to women and children in light of the following aspects ........1)Bill of rights...2) Discrimination....3)Human Rights Violations