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
Sphinxa [80]
3 years ago
9

Write a structured algorithm that prompts the

Computers and Technology
1 answer:
MA_775_DIABLO [31]3 years ago
8 0

Answer:

Step 1 : Start

Step2 : Input first number, num1

Step3 : Input second number, num2

Step4 : product - - > num1 * num2 (product of num1 and num2)

Step5 : Input product, myanswer

Step6 : comparison - - - > correct or incorrect based on myanswer and product

Step6: print(comparison)

Step7: End

Explanation:

Algorithm is a sequence of instructions a computer is expected to follow to solve a particular problem.

Required :

Two inputs ; num1 and num2

Expected output

Algorithm :

Step 1 : Start

Step2 : Input first number, num1

Step3 : Input second number, num2

Step4 : product - - > num1 * num2 (product of num1 and num2)

Step5 : Input product, myanswer

Step6 : comparison - - - > correct or incorrect based on myanswer and product

Step6: print(comparison)

Step7: End

The two numbers to multiply are entered ; the product is calculated by the program ; the the user inputs his or her own expecteted product ;

Both are compared and the output of the comparison is displayed (either correct oe incorrect)

You might be interested in
By default, Outlook displays messages in the Content pane grouped by the
goldfiish [28.3K]

Answer:

By default, Outlook orders messages in the Content pane grouped by dates the messages were received and sorted with the oldest message at the top of the list.

Explanation:

8 0
2 years ago
Write a program consisting of: a. A function named right Triangle() that accepts the lengths of two sides of a right triangle as
Lunna [17]

Answer:

The java program is as follows.

import java.lang.*;

public class Triangle

{

   //variables to hold sides of a triangle

   static double height;

   static double base;

   static double hypo;

   //method to compute hypotenuse

   static double rightTriangle(double h, double b)

   {

       return Math.sqrt(h*h + b*b);

   }

public static void main(String[] args) {

    height = 4;

    base = 3;

    hypo = rightTriangle(height, base);

 System.out.printf("The hypotenuse of the right-angled triangle is %.4f", hypo);

}

}

OUTPUT

The hypotenuse of the right-angled triangle is 5.0000

Explanation:

1. The variables to hold all the three sides of a triangle are declared as double. The variables are declared at class level and hence, declared with keyword static.

2. The method, rightTriangle() takes the height and base of a triangle and computes and returns the value of the hypotenuse. The square root of the sum of both the sides is obtained using Math.sqrt() method.

3. The method, rightTriangle(), is also declared static since it is called inside the main() method which is a static method.

4. Inside main(), the method, rightTriangle() is called and takes the height and base variables are parameters. These variables are initialized inside main().

5. The value returned by the method, rightTriangle(), is assigned to the variable, hypo.

6. The value of the hypotenuse of the triangle which is stored in the variable, hypo, is displayed to the user.

7. The value of the hypotenuse is displayed with 4 decimal places which is done using printf() method and %.4f format specifier. The number 4 can be changed to any number, depending upon the decimal places required.

8. In java, all the code is written inside a class.

9. The name of the program is same as the name of the class having the main() method.

10. The class having the main() method is declared public.

11. All the variables declared outside main() and inside another method, are local to that particular method. While the variables declared outside main() and inside class are always declared static in java.

4 0
3 years ago
We look for trends when we are looking at data. What is a trend?
yulyashka [42]
A subject of what people say at the time, most used, famous at the present time
4 0
3 years ago
Read 2 more answers
What term refers to a written report given about an event or other newsworthy subject? A. press box B. press kit C. press pass D
guajiro [1.7K]
D. Press release is the correct answer. 
4 0
3 years ago
Read 2 more answers
What is the outcome of using the formula =AVERAGE(A12:A20)?
balu736 [363]
Well according to the name of the function, I would say <span>A) the mean value of a set of numbers</span>
6 0
3 years ago
Read 2 more answers
Other questions:
  • The term ________________ denotes data that is being stored on devices like a universal serial bus (USB) thumb drive, laptop, se
    9·2 answers
  • How can you logout your account and do not want to have this anymore
    12·2 answers
  • ¿Ha existido en la historia de nuestra humanidad alguien que hubiera hecho posible el sueño del ser humano en obtener energía li
    11·1 answer
  • You've applied a filter. What's the best way to see the original data?
    11·2 answers
  • How many bits would be needed to count all of the students in class today there is 20 students
    6·1 answer
  • 1. Extract title Write a function extract_title that takes one parameter, the filename of a GenBank formatted file, and returns
    14·1 answer
  • Need help with this
    13·1 answer
  • Select the correct answer.
    15·1 answer
  • It's generally best to use what types of sites for factual internet research? Select all that apply from the choices below.
    5·2 answers
  • How has 5G become more energy efficient?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!