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
3. A 4-m × 5-m × 7-m room is heated by the radiator of a steam-heating system. The steam radiator transfers heat at a rate of 10
Natali [406]

Answer:

14.52 minutes

<u>OR</u>

14 minutes and 31 seconds

Explanation:

Let's first start by mentioning the specific heat of air at constant volume. We consider constant volume and NOT constant pressure because the volume of the room remains constant while pressure may vary.

Specific heat at constant volume at 27°C = 0.718 kJ/kg*K

Initial temperature of room (in kelvin) = 283.15 K

Final temperature (required) of room = 293.15 K

Mass of air in room= volume * density= (4 * 5 * 7) * (1.204 kg/m3) = 168.56kg

Heat required at constant volume: 0.718 * (change in temp) * (mass of air)

Heat required = 0.718 * (293.15 - 283.15) * (168.56) = 1,210.26 kJ

Time taken for temperature rise: heat required / (rate of heat change)

Where rate of heat change = 10000 - 5000 = 5000 kJ/hr

Time taken = 1210.26 / 5000 = 0.24205 hours

Converted to minutes = 0.24205 * 60 = 14.52 minutes

4 0
3 years ago
Electric heater wires are installed in a solid wall having a thickness of 8 cm and k=2.5 W/m.°C. The right face is exposed to an
Svet_ta [14]

Answer:

2.46 * 10⁵ W/m³

Explanation:

See attached pictures for detailed explanation.

6 0
4 years ago
Read 2 more answers
As the asteroid falls closer to the Earth's surface its _______ energy decreases and its _______ energy increases.
Levart [38]

Answer:

As the asteroid falls closer to the Earth's surface its <u>Gravitational</u> <u>Potential</u> energy <em>decreases</em> and its <u>Kinetic</u> energy <em>increases</em>.

4 0
3 years ago
In poor weather, you should __ your following distance
Ratling [72]

Answer:

I think reduce your following distance

5 0
3 years ago
Read 2 more answers
Find Re,Rc,R1 and R2!? Show your work.(hlp plz)
Brums [2.3K]
Can u be more clear with the question plsss?
3 0
3 years ago
Other questions:
  • You find a publication from a research laboratory that identifies a new catalyst for ammonia synthesis. The article contains the
    6·1 answer
  • If a steel cable is rated to take 800-lb and the steel has a yield strength of 90,000psi, what is the diameter of the cable?
    12·1 answer
  • Nitrate salts (NO3-), when heated, can produce nitrites (NO2-) plus oxygen (O2). A sample of potassium nitrate is heated, and th
    9·1 answer
  • Line(s) indicates passing is allowed if there are no oncoming cars.
    12·1 answer
  • Kjhwe ,kenwif ujwfeowlwfwfwfw...
    14·2 answers
  • What considerations are included in the Preliminary Floodproofing/Retrofitting Preference Matrix?
    7·1 answer
  • (25) Consider the mechanical system below. Obtain the steady-state outputs x_1 (t) and x_2 (t) when the input p(t) is the sinuso
    9·1 answer
  • Im passed due someone help meeeeeee
    7·2 answers
  • La iluminación de la superficie de un patio amplio es 1600 lx cuando el ángulo de elevación del sol 53°. Calcular la iluminación
    15·1 answer
  • Glyphicons is mainly used for​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!