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
horsena [70]
3 years ago
8

Which type of basic building blocks (constructs) is the following algorithm?

Computers and Technology
1 answer:
Tju [1.3M]3 years ago
7 0

The type of basic building blocks (constructs) used in the above algorithm is: A. Sequence.

An algorithm can be defined as a standard formula (procedures) which comprises a set of finite steps or instructions, that is typically used for solving a problem on a computer.

Basically, there are three (3) basic building blocks (constructs) used in an algorithm and these include:

I. Iteration.

II. Sequence.

III. Selection.

Selection is a building block (construct) that is used to determine the set of instruction or step to execute in a program based on a Boolean expression such as:

  • True or False.
  • Yes or NO.

If the conditional test (grade > 50) is True (Yes), a part of the program is executed, which is to output a "<u>Pass</u>."

Otherwise, the program would execute and output a "<u>Fail</u>" i.e the conditional test (grade > 50) is False (No).

 

Read more: brainly.com/question/21172316

You might be interested in
What is a method whereby new problems are solved based on the solutions from similar cases solved in the past?
swat32

Answer:

"Case-Based Reasoning" is the answer for the above question.

Explanation:

  • Case-Based Reasoning is a process of decision-making theory in which the new problems were solved based on the previously solved problem.
  • It is used in artificial intelligence and robots. This helps to make any AI and robots to do the work and take decisions on its own.
  • The theory is used to make any computer that behaves like humans. It can take decisions like a human.
  • The above question asked about the method by which the new problem is solved on behalf of the old problem. Hence the answer is "Case-Based Reasoning".
3 0
3 years ago
You and a few friends are having a meal at a pizza restaurant, and the server has just given you the bill. Write a function that
cestrela7 [59]

Answer:

How to calculate the total cost of the meal

For bill inclusive of tax, cost1=cost*(1+tax percentage)

For bill inclusive of tax and tip, cost2=cost1*(1+tip percentage)

Meal cost =(pizza cost*(1+tax percentage))*(1+tip percentage)

Now how to calculate the cost per person

cost per person=meal cost/ number of people.

C language code to solve the above problem is given below with appropriate comments for explanation

Explanation:

#include<stdio.h>

float split_bill(int cost,float tax)

{

//Declaring number of people as int

int number;

//Prompting for number of people

printf("Enter number of people ");

scanf("%d",&number);

//Declaring tip percentage as float

float tip_percent;

//Prompting for tip percentage

printf("Enter tip percentage between 0 and 1 ");

scanf("%f",&tip_percent);

//Calculating total meal cost

float meal=(((float)cost)*(1+tax))*(1+tip_percent);

//Printing total cost of meal

printf("Total cost of meal: %0.2f ",meal);

//Calculating cost per person

float cost_per_person=meal/number;

//Returning cost per person to main function

return cost_per_person;

}

int main()

{

//Declaring pizza cost as int and tax percentage as float

int pizza_cost;

float tax_percent;

//Prompting user for pizza cost

printf("Enter billing amount of pizza ");

scanf("%d",&pizza_cost);

//Prompting user for tax percentage

printf("Enter tax percentage between 0 and 1 ");

scanf("%f",&tax_percent);

//Printing the cost per person by calling the function split_bill

printf("Total cost per person is: %0.2f ",split_bill(pizza_cost,tax_percent));

return 0;

}

8 0
3 years ago
Another word for Arithmetic Logic Unit​
stira [4]

Answer:

ALU

Explanation:

just to say it faster than having to say it...

4 0
3 years ago
Which of the following best describes why Earth’s atmosphere can support life on Earth?
Juliette [100K]
C. is very thin, thus allowing harmful gases to escape from it
4 0
3 years ago
A batholith is an example of a(n) _____ igneous rock (one of the two main igneous rock groups).
Naily [24]
A batholith is an intrusive igneous rock.
3 0
4 years ago
Read 2 more answers
Other questions:
  • How are blogs and wiki alike
    15·2 answers
  • Which of the following controls will provide an area in the form for the user to enter a name? a. button b. label c. text box d.
    8·1 answer
  • What two tools can be used to disable a service and to give a list of all currently running services, respectively?
    7·1 answer
  • In the Microsoft Office Suite, what tells a database what to insert information in the document? 
    8·1 answer
  • What does "scanf(\"%d\" mean?
    13·2 answers
  • Use the function random.randint to write a program that rolls a 6-sided die 100 times, and prints out all of the rolls.
    8·1 answer
  • Create and configure databases in oracle database management system operation administration
    6·1 answer
  • What are software applications?
    14·1 answer
  • Carl is beginning a digital forensic investigation. he has been sent into the field to collect a machine. when he arrives, he se
    11·1 answer
  • how would you deploy network connectivity in the 25 classrooms, 12 faculty offices, and the common areas of the building?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!