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
Create two arrays with 5 elements each: one will hold Strings and the second will hold integers. Write a program to ask the user
MrMuchimi

Answer:

#include <iostream>

#include <iomanip>

#include <string>

using namespace std;

int main() {

   string name[5];  

   int age[5];  

   int i,j;  

   for ( i = 0; i<=4; i++ ) {  

       cout << "Please enter student's name:";  

       cin >> name[i];  

       cout << "Please enter student's age:";  

       cin >> age[i];          

   }  

for (i=0;i<=4;i++){

   cout<<"Age of  "<< name[i]<<"  is  "<<age[i]<<endl;  

}

}

Output of above program is displayed in figure attached.

5 0
3 years ago
I ran across this symbol in some Electrical wiring documents and I am unaware of what this means. Any help?
Minchanka [31]

Answer:

Opened Push-button Switch (i.e. a PTM Switch)

Explanation:

Tha's just another symbol for a switch, but this one specifies that the switch is a push-button type of switch.

Since it's not touching and completing the line, the state of the switch is initially open.

6 0
3 years ago
Describe a project in which you would use a pleater, ruffling foot, or gathering foot. Explain each of these tools and choose th
WITCHER [35]

A project that requires using a pleater, a ruffling foot, or a gathering foot is the creation of a dress.

A pleater, a ruffling foot, and a gathering foot are all accessories for sewing machines or machines themselves that help fashion designers to give the fabric a different shape or texture, and therefore create unique pieces.

  • Pleater: This tool includes multiple needles that go through the fabric to create multiple pleats
  • Ruffling foot: This is usually an accessory for sewing machines to create ruffles
  • Gathering foot: This tool is used to create gathers in fabric, these differ from ruffles because they are smaller and more subtle than ruffles

All of the tools can be used in the creation of a dress, for example, a pleater can be used in the top section of the dress to give it a nice texture and make it different from the skirt. In the same way, others such as the ruffling foot or the gathering foot can be used in the sleeves of the dress.

Learn more in: brainly.com/question/24702927

8 0
3 years ago
Steam enters an adiabatic turbine at 10 MPa and 500°C and leaves at 10 kPa with a quality of 90 percent. Neglecting the changes
Anna35 [415]

Answer:

The mass flow rate of steam m=5.4 Kg/s

Explanation:

Given:

  At the inlet of turbine P=10 MPa  ,T=500 C

 AT the exit of turbine  P=10 KPa   ,x=0.9

 Required power=5 MW

From steam table

<u> At 10 MPa and 500 C:</u>

  h=3374 KJ/Kg  ,s=6.59 KJ/Kg-K  (Super heated steam table)

<u>At 10 KPa:</u>

h_g=2675.1 KJ/Kg, h_f=417.51  KJ/Kg

s_g= 7.3  KJ/Kg-K                ,s_f=1.3   KJ/Kg-K

So enthalpy of steam at the exit of turbine

h= h_f+x(h_g- h_f)

Now by putting the values

h= 417.51+0.9(2675.1- 417.51) KJ/Kg

h=2449.34  KJ/Kg

Lets take m is the mass flow rate of steam

So 5\times 10^3=m\times (3374-2449.34)

m=5.4 Kg/s

So the mass flow rate of steam m=5.4 Kg/s

8 0
3 years ago
Thế nào là góc quay xe ?
slava [35]

Answer:

what's what is what is it return if you have any clue please let me know Translate in English and send me because most of them are are from English I think so

8 0
2 years ago
Other questions:
  • Compute the fundamental natural frequency of the transverse vibration of a uniform beam of rectanqular cross section, with one e
    11·2 answers
  • Two AAA-size lithium batteries are connected in series in a flashlight. Each battery has 3.5 volt and 4- Amp-hour capacity. If t
    8·1 answer
  • The steel bar has a 20 x 10 mm rectangular cross section and is welded along section a-a. The weld material has a tensile yield
    11·1 answer
  • c++ If your company needs 200 pencils per year, you cannot simply use this year’s price as the cost of pencils 2 years from now.
    9·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
  • Thermal conductivity of AISI 316 Stainless Steel at 90ºC is 14.54 W/m K. Convert this value to IP system.
    8·1 answer
  • Someone claims that the shear stress at the center of a circular pipe during fully developed laminar flow is zero. Do you agree
    12·1 answer
  • JAVA HADOOP MAPREDUCE
    13·1 answer
  • Compute the thermal efficiency for an ideal gas turbine cycle that operates with a pressure ratio of 6.75 and uses helium gas.
    12·1 answer
  • How many millimeters are there in a centimeter?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!