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]
2 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]2 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
Discoloration on walls, work surfaces, ceilings, walls, and pipes may indicate a leak that is causing you to waste raw materials
suter [353]

Answer:

True :)

Explanation:

If this is a true or false question.

6 0
2 years ago
Make two lists of applications of matrices, one for those that require jagged matrices and one for those that require rectangula
Agata [3.3K]

Answer:

Explanation:

You can utilize barbed clusters to store inadequate grids. On the off chance that there are a great many lines yet each line has just 4 or 5 associations with different segments, at that point as opposed to utilizing a 1000x1000 cluster you can utilize a 1000 line rough exhibit while you simply store the components that the present section has association with another segment. Other utilization can be done on account of query tables. Query tables will be tables which have different qualities concerning a solitary key where the quantity of qualities isn't fixed. Aside from this, barbed clusters have an exceptionally set number of utilization cases. Multidimensional exhibits then again have plenty of utilizations. It is utilized to store a great deal of information reliably on the grounds that the greater part of the information is put away is steady concerning which section compares to what information. Aside from that it very well may be utilized to make thick diagrams or sparse(not effective), plotting information. Another utilization case would be used as an impermanent stockpiling for the figurings that need to tail them and utilize the past information like in powerful programming.

3 0
3 years ago
If you are unsure about holding a piece of wood to be drilled, then you should always use a
alisha [4.7K]
C I took construction class
4 0
3 years ago
B)
Triss [41]

Answer:

2.5 is the required details

8 0
3 years ago
(3) Calculate the heat flux through a sheet of brass 7.5 mm (0.30 in.) thick if the temperatures at the two faces are 150°Cand 5
bezimeni [28]

Answer:

a.) 1.453MW/m2,  b.)  2,477,933.33 BTU/hr  c.) 22,733.33 BTU/hr  d.) 1,238,966.67 BTU/hr

Explanation:

Heat flux is the rate at which thermal (heat) energy is transferred per unit surface area. It is measured in W/m2

Heat transfer(loss or gain) is unit of energy per unit time. It is measured in W or BTU/hr

1W = 3.41 BTU/hr

Given parameters:

thickness, t = 7.5mm = 7.5/1000 = 0.0075m

Temperatures 150 C = 150 + 273 = 423 K

                        50 C = 50 + 273 = 323 K

Temperature difference, T = 423 - 323 = 100 K

We are assuming steady heat flow;

a.) Heat flux, Q" = kT/t

K= thermal conductivity of the material

The thermal conductivity of brass, k = 109.0 W/m.K

Heat flux, Q" = \frac{109 * 100}{0.0075} = 1,453,333.33 W/m^{2} \\ Heat flux, Q" = 1.453MW/m^{2} \\

b.) Area of sheet, A = 0.5m2

Heat loss, Q = kAT/t

Heat loss, Q = \frac{109*0.5*100}{0.0075} = 726,666.667W

Heat loss, Q = 726,666.667 * 3.41 = 2,477,933.33 BTU/hr

c.) Material is now given as soda lime glass.

Thermal conductivity of soda lime glass, k is approximately 1W/m.K

Heat loss, Q=\frac{1*0.5*100}{0.0075} = 6,666.67W

Heat loss, Q = 6,666.67 * 3.41 = 22,733.33 BTU/hr

d.) Thickness, t is given as 15mm = 15/1000 = 0.015m

Heat loss, Q=\frac{109*0.5*100}{0.015} =363,333.33W

Heat loss, Q = 363,333.33 * 3.41 = 1,238,966.67 BTU/hr

5 0
2 years ago
Other questions:
  • Air is compressed in the compressor of a turbojet engine. Air enters the compressor at 270 K and 58 kPa and exits the compressor
    13·1 answer
  • Electrical strain gauges were applied to a notched specimen to determine the stresses in the notch. The results were εx=0.0019 a
    13·1 answer
  • Consider a process in which a carbon-based fuel is combusted in the presence of 70% excess oxygen (assume that all of the oxygen
    10·1 answer
  • A part has been tested to have Sut = 530 MPa, f = 0.9, and a fully corrected Se = 210 MPa. The design requirements call for the
    10·1 answer
  • A cooling system load is 96,000 BTUh sensible. How much chilled air is required to satisfy the load if the system is designed fo
    12·1 answer
  • Omg I just got 17/25 questions wrong using this on an Ag test , but got 100’s every time on health
    6·2 answers
  • Pls answer and I will give a like!
    8·1 answer
  • 12. What procedure should you follow when taking measurements?
    11·1 answer
  • Task Three :Write a C++ program to read temperature
    15·1 answer
  • In a lab, scientists grew several generations of offspring of a plant using the method shown. What conclusion can you make about
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!