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
Serggg [28]
3 years ago
12

Part of the following pseudocode is incompatible with the Java, Python, C, and C++ language Identify the problem. How would you

fix the problem if you were to translate theis pseudocode into one of the aforementioned languages?. Module checkEquality(Integer num1, Integer num2)
If num1 = num2 Then

Display *The values are equal.*

Else

Display *The values are Not equal.*

End if

End Module
Engineering
1 answer:
hammer [34]3 years ago
4 0

Answer:

The main problem is the incorrect use of assignment operator, the correct way to check if two number are equal is

num1==num2

Explanation:

Here we have a created a simple function which takes two input arguments num1 and num2. In the body of the function we have used if condition to find out whether the two number are equal or not. If condition is true then print that values are equal. If condition is false then print that values are not equal. In the driver code, we have called the function two times with different values of num1 and num2 to check if it is working correctly.

The implementation logic is same in all these programming languages, the only difference the syntax.

Python Code:

def checkEquality(num1, num2):

   if num1 == num2:

       print("The values are equal.")

   else:

       print("The values are not equal.")

Driver Code:

checkEquality(2,5)

checkEquality(3,3)

Output:

The values are not equal.

The values are equal.

C++ Code:

void checkEquality(int num1, int num2) {

   if (num1 == num2)

       cout<<"The values are equal."<<endl;

   else

       cout<<"The values are not equal."<<endl;

}

Driver Code:

#include <iostream>

using namespace std;

void checkEquality(int num1, int num2);

int main()

{

checkEquality(2,5);

checkEquality(3,3);

return 0;

}

Output:

The values are not equal.

The values are equal.

You might be interested in
Energy that causes a transfer of heat between marterials
notsponge [240]

Thermal radiation is a form of heat transfer because the electromagnetic radiation emitted from the source carries energy away from the source to surrounding (or distant) objects.

I tried, but I hope this helps :)

4 0
3 years ago
Calculate the load, PP, that would cause AA to be displaced 0.01 inches to the right. The wires ABAB and ACAC are A36 steel and
Nataly [62]

Answer:

P = 4.745 kips

Explanation:

Given

ΔL = 0.01 in

E = 29000 KSI

D = 1/2 in  

LAB = LAC = L = 12 in

We get the area as follows

A = π*D²/4 = π*(1/2 in)²/4 = (π/16) in²

Then we use the formula

ΔL = P*L/(A*E)

For AB:

ΔL(AB) = PAB*L/(A*E) = PAB*12 in/((π/16) in²*29*10⁶ PSI)

⇒  ΔL(AB) = (2.107*10⁻⁶ in/lbf)*PAB

For AC:

ΔL(AC) = PAC*L/(A*E) = PAC*12 in/((π/16) in²*29*10⁶ PSI)

⇒  ΔL(AC) = (2.107*10⁻⁶ in/lbf)*PAC

Now, we use the condition

ΔL = ΔL(AB)ₓ + ΔL(AC)ₓ = ΔL(AB)*Cos 30° + ΔL(AC)*Cos 30° = 0.01 in

⇒  ΔL = (2.107*10⁻⁶ in/lbf)*PAB*Cos 30°+(2.107*10⁻⁶ in/lbf)*PAC*Cos 30°= 0.01 in

Knowing that   PAB*Cos 30°+PAC*Cos 30° = P

we have

(2.107*10⁻⁶ in/lbf)*P = 0.01 in

⇒  P = 4745.11 lb = 4.745 kips

The pic shown can help to understand the question.

5 0
3 years ago
"Mass burn technology uses unprocessed municipal solid waste to generate heat which is used to produce electricity."
Flura [38]

Answer:

True

Explanation:

Mass burn technology is a type of waste-to-energy technology commonly used in the mass-burn system, where unprocessed municipal solid waste is burned in a large incinerator with a boiler, to  generate heat used in the production of electricity.

6 0
2 years ago
Read 2 more answers
The coefficient of static friction for both wedge surfaces is μw=0.4 and that between the 27-kg concrete block and the β=20° inc
balandron [24]

Assuming  the wedge has an angle of 5°.The minimum value of the force P that is required to begin moving the block up the incline is: 322.84 N.

<h3>Minimum value of force P</h3>

First step

Using this formula to find the weight of the block

W=mg

W=27×9.81

W=264.87 N

Second step

Angles of friction ∅A and ∅B

∅A=tan^-1(μA)

∅A=tan^-1(0.70)

∅A=34.99°

∅B=tan^-1(μB)

∅B=tan^-1(0.40)

∅B=21.80°

Third step

Equate the sum of forces in m-direction to 0 in order to find the reaction force at B.

∑fm=0

W sin (∅A+20°)  + RB cos (∅B+∅A)=0

264.87 sin(34.99°+20°) + RB cos (21.80°+34.99°)=0

216.94+0.5477Rb=0

RB=216.94/0.5477

RB=396.09 N

Fourth step

Equate the sum of forces in x-direction to 0 in order to find force Rc.

∑fx=0

RB cos (∅B) - RC cos (∅B+ 5°)=0

396.09 cos(21.80°) - RC cos (21.80°+5°)=0

RC=396.09 cos(21.80°)/cos(26.80°)

RC=412.02 N

Last step

Equate the sum of forces in y-direction to 0 in order to find force P required to move the block up the incline.

∑fy=0

RB sin (∅B) + RC sin (∅B)-P=0

P=Rb sin (∅B) + RC sin (5°+∅B)

P=396.09 sin(21.80°) +412.02sin (5°+21.80°)

P=322.84 N

Inconclusion the minimum value of the force P that is required to begin moving the block up the incline is: 322.84 N.

Learn more about Minimum value of force P here:brainly.com/question/20522149

7 0
2 years ago
A 800-MW steam power plant, which is cooled by a nearby river, has a thermal efficiency of 40 percent. Determine the rate of hea
Arturiano [62]

Answer:

Rate of heat transfer to river=1200MW

So the actual amount of heat rejected ti the river will be less as there will some heat loss to surrounding and in pipes

Explanation:

In order to find the actual heat transfer rate is lower or higher than its value we will first find the rate of heat transfer to power plant:

Efficiency=\frac{work}{heat transfer to power plant}

Heat transfer=\frac{work}{Efficiency\\} \\\\Heat transfer=\frac{800}{0.40}\\\\Heat transfer=2000MW

From First law of thermodynamics:

Rate of heat transfer to river=heat transfer to power plant-work done

Rate of heat transfer to river=2000-800

Rate of heat transfer to river=1200MW

So the actual amount of heat rejected ti the river will be less as there will some heat loss to surrounding and in pipes.

4 0
3 years ago
Other questions:
  • 1. What is an op-amp? List the characteristics of an ideal op-amp
    11·1 answer
  • "A computer architect redesigns the pipeline above to enable branch prediction. When PCSrc is asserted (branch taken) IF/ID is f
    10·1 answer
  • A transmitter has an output power of 0.1mW while the fiber has coupling loss of 12dB, attenuation of
    11·1 answer
  • What is a coarse-grained rock composed of intermediate plagioclase feldspar and pyroxene? a. graniteb. gabbro c. andesited. peri
    9·1 answer
  • ____________ is the range of all the colors created by different amounts of light.
    8·2 answers
  • Please help me with this. Picture
    10·1 answer
  • Find the general solution of the equation<br>a) Tan A = 1/√3​
    11·1 answer
  • 6 A square silicon chip (k 150 W/m K) is of width w 5 mm on a side and of thickness t 1 mm. The chip is mounted in a substrate s
    9·1 answer
  • Ohm's law states that the current (I) in amps equals the voltage (E) in volts decided by the resistance (R) in ohm's. If you con
    15·1 answer
  • True or false for the 4 questions?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!