0% found this document useful (0 votes)
17 views1 page

Sheet 2 (Programming) : A. Flowcharts

The document provides 13 problems to draw flowcharts for calculating various mathematical expressions and determining results. It also provides 10 problems to write MATLAB programs to solve the same types of mathematical calculations and determine results.

Uploaded by

seif mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Sheet 2 (Programming) : A. Flowcharts

The document provides 13 problems to draw flowcharts for calculating various mathematical expressions and determining results. It also provides 10 problems to write MATLAB programs to solve the same types of mathematical calculations and determine results.

Uploaded by

seif mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Numerics Fall 2021

Sheet 2 (Programming)
A. Flowcharts
x
1. Draw a flowchart to calculate e for a given x using a Taylor polynomial of degree 2.

2. Draw a flowchart to calculate sinhx for a given x using a Taylor polynomial of degree 3.

3. Draw a flowchart to calculate ln(1+x) for a given x using a Taylor polynomial of degree 4.

4. Draw a flowchart to calculate: (a) the area of a rectangle, (b) the sum of two numbers.

5. The velocity v(m/s) of a body as a function of time (s) is given by



10t 0t 5
v (t )   2

2t t 5
Draw a flowchart to calculate the velocity at a given positive time.

6. Draw a flowchart to determine the largest of: (a) two numbers, (b) three numbers.

7. Draw a flowchart to determine the largest of 66 numbers.

8. Draw a flowchart to calculate:


(a) the sum of 100 numbers, (b) the sum of N numbers,
(c) the sum of some non-zero numbers ending with zero.

9. Draw a flowchart to calculate the factorial of a given number.

10. You are solving a problem using an iterative numerical method with some initial guess. The
solution will be acceptable when the absolute relative approximate error does not exceed 1%.
Draw a flowchart to display the results.

11. In problem 10, the number of iterations should not exceed 1000. Draw a flowchart.

12. The result of an exam is either ‘Fail’ with a score less than 50% or ‘Pass’ otherwise. Draw a
flowchart to display the result for:
(a) one student, (b) 90 students,
(c) variable number of students, (d) unknown number of students.

13. An exam is given to a class of 60 students. Draw a flowchart to calculate the class average and
the number of students who scored below the average.

B. MatLab Programs
Write MatLab programs for problems 1 – 10.
Run the programs, assuming needed data, and give results.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy