Ada95 program To Implement the Euler’s, Exercises of Aeronautical Engineering

This is solution to assignment for Aeronautical Engineering and Computer Programming course. It was submitted to Prof. Chitraksh Gavde at Biju Patnaik University of Technology, Rourkela. It includes: Program, Ada, Eular, For, Else, If, End, Algorithm, Ada95, Implement, Integration

Typology: Exercises

2011/2012

Uploaded on 07/20/2012

savitri_122
savitri_122 🇮🇳

4.6

(14)

184 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
C11 Solutions
1. Count := 1;
FOR I in 1 .. 10 LOOP
If I MOD 2 = 0 THEN
FOR J in 1 .. 10 LOOP
Count:= Count + 2;
END LOOP;
ELSE FOR J in 1 .. 5 LOOP
Count := Count – 1;
END LOOP;
END IF;
END LOOP;
Count = 76.
Count increments by 20 when I is even and decrements by 5 when I is odd.
2. Write an Ada95 program to implement the Euler’s 2nd order integration method? Turn
in a hard copy of your algorithm and code listing and an electronic copy of your code.
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Ada95 program To Implement the Euler’s and more Exercises Aeronautical Engineering in PDF only on Docsity!

C11 Solutions

Count := 1; FOR I in 1 .. 10 LOOP If I MOD 2 = 0 THEN FOR J in 1 .. 10 LOOP Count:= Count + 2; END LOOP; ELSE FOR J in 1 .. 5 LOOP Count := Count – 1; END LOOP; END IF; END LOOP;

Count = 76.

Count increments by 20 when I is even and decrements by 5 when I is odd.

  1. Write an Ada95 program to implement the Euler’s 2nd^ order integration method? Turn in a hard copy of your algorithm and code listing and an electronic copy of your code.

C 11 part b ALGORTIHM

Eluer’s 2nd^ order integration – use trapeziodal rule. Area of a trapezoid under curve = .5(y1+y2)delta_x

Algortihm: Ask user for inputs:

  • Coefficients of each polynomial term plus constant
  • Upper and Lower Bounds of integration
  • Step Size Calculate number of steps = (upper_bound-lower_bound)/step_size and convert it to an integer

Loop from 0 to the number of steps using a for loop, performing euler’s second order approximation

  • Integral = Integral + .5(y1+y2)step_size
  • Y1 = Y
  • Y2 = Y2 +Step_Size Print out results