English, asked by bhadangebalaji2002, 11 months ago

defined algorithm in c​

Answers

Answered by Deepak0211
2

Answer:

Originally Answered: What is analgorithm in C language? An algorithm is a procedure or step-by-step instruction for solving a problem. They form the foundation of writing a program. For writing any programs, the following has to be known: Input. Tasks to be preformed.

Explanation:

HOPE IT WILL HELP YOU

PLEASE MARK AS BRAINLIEST PLZ.PLZ.PLZ

Answered by Anonymous
4

Explanation:

Algorithms are a set of step-by-step instructions that satisfy a certain set of properties. In this lesson, we'll explore the properties an algorithm must satisfy in order to be useful using an example.

Algorithms

Have you ever tried to assemble a piece of furniture by yourself? If so, you probably used a set of step-by-step instructions to assist you in your endeavor. Wouldn't it be nice if math problems came with a set of instructions like this? Oh wait, they do!

When solving a math problem, we usually use an algorithm, or a set of step-by-step instructions. For example, suppose we're trying to figure out what the perimeter of a rectangle with length 5 units would be for various widths. Since the formula for the perimeter of a rectangle is:

P = 2l + 2w, where l = length and w = width

we can plug in 5 for l to get P = 2(5) + 2w = 10 + 2w. Ultimately, we're trying to find the different values of P for various values of w, where

P = 10 + 2w

To figure out the perimeter for this rectangle, for some width w, we follow these steps:

Multiply w by 2.

Add 10 to the result. This is the perimeter.

algoprop1

This is an example of an algorithm. It is a set of steps that we can follow in order to find the perimeter of the rectangle for a given width, w. Now suppose we want to know what the perimeter of this rectangle would be if it had a width of 8 units. Again, we can use our algorithm.

Multiply 8 by 2: 8 ⋅ 2 = 16

Add 10 to the result: 16 + 10 = 26

<marquee behaviour- move> <font color ="purple"><h2> SaTTu</hy> </marquee>

Similar questions