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
Footing: This is a 3 m wide strip footing, located on the ground surface of an isotropic, homogeneous
Rufina [12.5K]

Answer:

3

Explanation:

5 0
3 years ago
You are driving on a roadway with multiple lanes of travel in the same direction, and are approaching an emergency vehicle parke
solmaris [256]

Answer: a. Leave the lane closest to the emergency as soon as it is safe to do so, or slow down to a speed of 20 MPH below the posted speed limit.

Explanation:

Giving a way to the law enforcement vehicle and a medical emergency vehicle is necessary. If one approaches an emergency vehicle parked along the roadway one should change the lane as the vehicle may not move and the driver may also waste his or her time also one should also slow down his or her speed while approaching the vehicle as most of the emergency vehicle are in rush to reach the hospital so the driver should maintain some distance with the medical emergency vehicle.

7 0
3 years ago
How do you extablish a chain of dimensions​
kap26 [50]

Answer:

Certamente você conhece três dimensões: comprimento, largura e profundidade. Além disso, quando se pensa um pouco fora da caixa também seria possível adicionar a dimensão do tempo.

Provavelmente, algumas pessoas viajam na maionese quando toca-se nesse assunto. Vem em suas mentes universos paralelos e até mesmo realidades alternativas. Mas também não se trata disso.

Explanation:

Basicamente as dimensões são as facetas do que nós percebemos a ser realidade. Existem muitos debates sobre dimensões na física. Um dos que mais chamam a atenção se chama Teoria das Cordas.

r

5 0
3 years ago
The flowrate through a rectangular channel is 20 cfs. The upstream width of the channel is 10 ft, and the depth of the water in
Liula [17]

To solve this problem we will use the Froude number that relates the Forces of Inertia with the Forces of Gravity. There will be jump in the downstream only if Froude Number (Fr) is greater than 1 at upstream. Our values are given as,

Q = 20cfs\\w= 10ft\\D= 1ft

Then the velocity would be:

V = \frac{Q}{wD}V = \frac{20}{10*1}V = 2ft/s

The number of Froude is given as,

Fr = \frac{V}{gD}^{1/2}

Where,

V = Velocity

g = Gravity

D = Diameter

Replacing we have that

Fr = \frac{2}{32.2}^{1/2}\\Fr = 0.352\\Fr

There will be no Jump, correct answer is B.

5 0
3 years ago
SE DEBE CONTRUIR UNA PARED QUE TENDRÁ 4 METROS DE LARGO POR 3 METROS
Marizza181 [45]

Answer:

you pagil

Explanation:

8 0
3 years ago
Other questions:
  • Zona intermedia de pozos <br> Y<br> Efecto de inavasion
    6·1 answer
  • What are the main factors for the high material removal rate in broaching operations?
    9·1 answer
  • Can someone help me on my auto tech worksheet
    13·1 answer
  • What are some common ways of converting fuel to useful energy? Check all that apply.
    9·2 answers
  • According to OSHA, employers must_____ and _____ hazardous chemicals in the workplace. Which selection completes the sentence to
    14·1 answer
  • The ______ cycle begins with the new moon.
    10·1 answer
  • Air exits the compressor and enters the combustor of a gas turbine engine with a flow rate of 84 kg/s at 800 K. Ethane (C2H6) at
    12·1 answer
  • While discussing PCM monitor tests: Technician A says that some monitors only run after another monitor completes. Technician B
    10·1 answer
  • A customer got debited twice, how would you investigate and resolve this conflict on the customer side and on the company side?
    5·1 answer
  • A six-lane freeway (three lanes in each direction) in rolling terrain has 10-ft lanes and obstructions 5 ft from the right edge.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!