1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sophie [7]
2 years ago
12

Do not use C++ pointers (this is not a topic of this course).

Engineering
1 answer:
noname [10]2 years ago
4 0

The program is an illustration of functions in C++

C++ functions are collection of named program statements that are executed when called

<h3>The C++ program</h3>

The program in C++, where comments are used to explain each action is as follows:

#include <iostream>

#include <cmath>

using namespace std;

//This defines the boolean method

bool isoscelesTriangleHeightAndArea(double base, double hypotenuse, double height, double area) {

   //This checks for invalid base and height

   if(base < 0 || hypotenuse < 0){

       return false;

   }

   //This returns true if base and height are valid

   return true;

}

//The main begins here

int main(){

   //This initializes the variables

   double base, hypotenuse, height, area;

   //This gets input for base and hypotenuse

   cout<<"Base: ";    cin>>base;

   cout<<"Hypotenuse: "; cin>>hypotenuse;

   //The calls the boolean method

   bool success = isoscelesTriangleHeightAndArea(base, hypotenuse, height, area);

   //If success is True

   while (success){

       //This calculates height

       height = sqrt(hypotenuse*hypotenuse - (base/2) * (base/2));

       //This calculates area

       area = 0.5 * base * height;

       //This prints height

       cout << "Triangle height is " << height << endl;

       //This prints area

       cout << "Triangle area is " << area << endl;

       //This gets input for base and hypotenuse

       cout<<"Base: ";    cin>>base;

       cout<<"Hypotenuse: "; cin>>hypotenuse;

       bool success = isoscelesTriangleHeightAndArea(base, hypotenuse, height, area);

   }

   cout << "Invalid Input!" << endl;

}

Read more about C++ programs at:

brainly.com/question/24833629

#SPJ1

You might be interested in
The in situ moist unit weight of a soil is 17.3 kN/m3 and the moisture content is 16%. The specific gravity of soil solids is 2.
Temka [501]

Answer:

Explanation:

Given that,

Moist content w = 16%

The in situ moist unit weight of the soil : γ(in situ) = 17.3 kN/m³

Specific gravity of the soil

G(s) = 2.72

Minimum dry unit weight of the soil

γd(compacted) = 18.1 kN/m³

Moist content is same as above

w = 16%

Question

how many cubic meters of soil from the excavation site are needed to produce 2000 m³ of compacted fill?

Let determine the in situ dry unit weight γd(in-situ) using the relation

γd(in-situ) = γ(in-situ) / [1 + (w/100)]

γd(in-situ) = 17.3/ [1 + (18/100)]

γd(in-situ) = 17.3 / ( 1 + 0.18)

γd(in-situ) = 17.3 / 1.18

γd(in-situ) = 14.66 kN/m³

To determine the Volume of the soil to be excavated (Vex)

Let the Volume to be excavated = V

We can use the relation

V=V(fill) × γd(compacted) / γd(in situ)

Given that, V(fill) = 2000m³

V(fill) is the volume of the compacted fill

Therefore,

V=V(fill) × γd(compacted) / γd(in situ)

Vex = 2000 × 18.1 / 14.66

Vex = 2469.13 m³

So, the excavated volume of the soil is 2469.13 m³

3 0
4 years ago
Which type of material is known as elastomers to materials scientists and engineers
KIM [24]

Answer:

Rubber-like solids with elastic properties are called elastomers. Polymer chains are held together in these materials by relatively weak intermolecular bonds, which permit the polymers to stretch in response to macroscopic stresses. Natural rubber, neoprene rubber, buna-s and buna-n are all examples of such elastomers.

8 0
3 years ago
Need answers for these please ​
Step2247 [10]

Answer:

Following are given the answers one-by-one with explanation:

(a) 8 records

As records are the horizontal rows of data and we have 8 of them.

(b) 5 fields

As fields are vertical columns of data and we have 5 of them.

(c)E3000

As by sorting Makers_names in ascending order the last one would be Rany and by sorting Processor_type we have two option with Rany that are B1500 and E3000. We can see that E3000 will come at the end.

(d) Computer_type

As only two choices (Laptop and PC )  are being used under the column computer_type so it can be amended to contain Boolean data.

(e) format check

This will check that the field should contain one alphabet (capital letter) followed by 4 digits each.

i hope it will help you!

7 0
3 years ago
Plane wall of material A with internal heat generation is insulated on one side and bounded by a second wall of material B, whic
viktelen [127]

Sorry❤

Have a nice day ✨

8 0
3 years ago
The 5-kg collar has a velocity of 5 m&gt;s to the right when it is at A. It then travels along the smooth guide. Determine its s
Gnoma [55]

Answer:

The speed at point B is 5.33 m/s

The normal force at point B is 694 N

Explanation:

The length of the spring when the collar is in point A is equal to:

lA=\sqrt{0.2^{2}+0.2^{2}  }=0.2\sqrt{2}m

The length in point B is:

lB=0.2+0.2=0.4 m

The equation of conservation of energy is:

(Tc+Ts+Vc+Vs)_{A}=(Tc+Ts+Vc+Vs)_{B} (eq. 1)

Where in point A: Tc = 1/2 mcVA^2, Ts=0, Vc=mcghA, Vs=1/2k(lA-lul)^2

in point B: Ts=0, Vc=0, Tc = 1/2 mcVB^2, Vs=1/2k(lB-lul)^2

Replacing in eq. 1:

\frac{1}{2}m_{c}v_{A}^{2}+0+m_{c}gh_{A}+      \frac{1}{2}k(l_{A}-l_{ul})  ^{2}=\frac{1}{2}m_{c}v_{B}^{2}+0+0+\frac{1}{2}k(l_{B}-l_{ul})  ^{2}

Replacing values and clearing vB:

vB = 5.33 m/s

The balance forces acting in point B is:

Fc-NB-Fs=0

\frac{m_{C}v_{B}^{2}   }{R}-N_{B}-k(l_{B}-l_{ul})=0

Replacing values and clearing NB:

NB = 694 N

6 0
4 years ago
Read 2 more answers
Other questions:
  • Water enters a circular tube whose walls are maintained at constant temperature at specified flow rate and temperature. For full
    8·1 answer
  • ) A 20 ft horizontal beam is attached to a wall with a fixed support. If the beam is subjected to the distributed loads indicate
    12·1 answer
  • An alpha particle (α), which is the same as a helium-4 nucleus, is momentarily at rest in a region of space occupied by an elect
    12·1 answer
  • A circular specimen of MgO is loaded in three-point bending. Calculate the minimum possible radius of the specimen without fract
    7·1 answer
  • A heat engine is a device able to transform work into heat.<br> a. True<br> b. False
    13·1 answer
  • The wheel weighs 20 lb and rests on a surface for which μB = 0.2. A cord wrapped around it is attached to the top of the 30 lb h
    8·1 answer
  • While examining the color of an engine's coolant: Technician A says that because it is orange, the cooling system should be flus
    8·1 answer
  • Can someone pls give me the answer to this?
    9·1 answer
  • If a resistor only has three color bands, it has a tolerance of 20 percent. What would this mean for a resistor specified at 10,
    14·1 answer
  • 1. A loss of braking effectiveness due to too much heat in the brakes is called
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!