Computer Science, asked by Tweet825, 9 months ago

1.Write an algorithm and draw a flowchart to print N odd numbers. 2. Draw a flowchart to calculate the total marks and percentage of any 3 subjects. 3. Write an algorithm to find the area of a square. 4. Draw a flowchart to find the sum of first 50 natural numbers. 5. Draw a flowchart to calculate the product and modulus of given two numbers.

Answers

Answered by Anonymous
6

Answer:

How do I create or draw a flowchart to find the average of three input integer numbers?

What's new in the Huawei HMS Core 5.0?

On 29 June 2020, Huawei launched Huawei Mobile Services (HMS) Core 5.0 for global developers on the official Huawei Developer web

A flow chart is but a pictorial representation of an algorithm and is meant to depict the flow of control in a program.

The first step is to decide on an algorithm and maybe write it in the form of a pseudo code, an informal way of writing statements of a program without bothering about details of syntax.

Algorithms for the given problem:

[I]

Initialize Counter=0, Sum=0

Input integer

Add integer to Sum

Increment Counter

If Counter > 3, divide Sum by 3, Output result, stop

Else go to 2

[II]

Input Integer1, Integer2, Integer3

Average= ( Integer1+ Integer2+Integer3)/3

Output average

The second algorithm would be clumsy to find the average of a large number of inputs.

The first one can be easily generalised to handle n inputs, by introducing step 0 and modifying step 5

0. Input n

5. If Counter > n , divide Sum by n, Output result, stop

Note : There can be more ways of writing an algorithm for the problem by invoking loop control statements.

Having decided on the algorithm one can draw the flow chart following diagrammatic conventions, like using diamond boxes for decision (If), rectangles for assignment statements and conventional symbols [ ] for input and output. The control flow is to be indicated by directed arrows.

Answered by probrainsme102
0

Answer:

1.

Algorithm:

Step 1: Ready

Step 2: Declare variable x of integer type

Step 3: Set x=0

Step 4: Repeat step 5 to 8 while (x<=100)

Step 5: if (x%2 != 0)

Step 6: then print x

Step 7 : x=x+1

Step 8: Stop

Flowchart: Image Attached

2. Image attached

3:

Algorithm:

Step 1: Start

Step 2: Input S

Step 3: area = Sid * S

Step 4: print area

Step 5: Stop

Explanation:

4: Flowchart Attached

5. Algorithm:

Step 1:Start

Step2: Declare two numbers x and y

Step3:takes two value from users and store in  (x and y)

Step 5:Find output of (a*b)

Step6:Find output of (a÷b)

Step 7:Stop

#SPJ2

Attachments:
Similar questions