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
Why are there few effective HCI standards?
Oliga [24]

Answer:

<em>There are few effective Human Computer Interaction (HCI) standards because for one, standards are more suitable for hardware than software because they are relatively unstable. ... Some software product standards have been in place long before any formal standard documents were published.</em>

3 0
3 years ago
If pure oxygen is fed in excess by 25%, what would the fractional conversion of methane be for the final concentration of CO2 in
inessss [21]

Answer:the fractional conversion of methane is 12.5%

Explanation:The reaction represent the combustion of methane to produce Co2 and steam.

CH4 +2O2_CO2 + 2H2O

From gay lussac law of proportionality

1mol of CH4 requires 2mol of Oxygen to produce 1 mol of CO2 and 2mol of H2O

So from the combining ratio,25% of O2 will fractional produce 25×1/2% of CH4.

While 12.5% of CO2 and 25% of steam is also produced .so in essence 2.5% of CO2 was lost in the reaction.

7 0
4 years ago
Create a series of eight successive displacements that would program a robot to move in an octagonal path that is as close as yo
Komok [63]

Answer:

bts biot bts biot jungkukkk

jungkukkkbiot

Explanation:

bts biot bts biot jungkukkk

jungkukkkbiot

5 0
3 years ago
Omplete the following program: [0.5 X 4 = 2]
borishaifa [10]
I’m confused on this one
4 0
3 years ago
The largest class of errors in software engineering can be attributed to _______.
Ilya [14]

Answer:

improper imput validation

Explanation:

6 0
2 years ago
Other questions:
  • Two parallel Rivers (A and B) are separated by confined and unconfined aquifer estimate the RATE of seepage of river A to River
    15·1 answer
  • What is good for cleaning your vessel and does not harm lakes or rivers?
    6·1 answer
  • A thin metal disk of mass m=2.00 x 10^-3 kg and radius R=2.20cm is attached at its center to a long fiber. When the disk is turn
    11·1 answer
  • You live on a street that runs East to West. You just had 2 inche of snow and you live on the North side of the street. You retu
    14·1 answer
  • A hollow steel tube with an inside diameter of 100 mm must carry a tensile load of 400 kN. Determine the outside diameter of the
    12·2 answers
  • Nearly__________ of all serious occupational injuries and illnesses stem from overexertion of repetitive motion.a. 1/2b. 1/4c. A
    10·1 answer
  • An ideal Carnot engine extracts of heat from a high-temperature reservoir at 1200 during each cycle, and rejects heat to a low-t
    10·1 answer
  • Give me an A please!!!¡!!!!¡
    5·1 answer
  • What year did Vidal Sassoon come to America ?
    7·2 answers
  • If weather conditions are such that it is required to designate an alternate airport on your IFR flight plan, you should plan to
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!