AERO 220 Introduction to Aerospace Engineering Computation - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

AERO 220 Introduction to Aerospace Engineering Computation

Description:

AERO 220 Introduction to Aerospace Engineering Computation – PowerPoint PPT presentation

Number of Views:153
Avg rating:3.0/5.0
Slides: 11
Provided by: kaush8
Category:

less

Transcript and Presenter's Notes

Title: AERO 220 Introduction to Aerospace Engineering Computation


1
AERO 220 Introduction to Aerospace Engineering
Computation
Meetings Time Tuesdays and Thursdays,1110 AM
1225 PM Place SSC 102 B http//imechanica.org/n
ode/6727 10/22/09
2
Solution for mid term 1
  • Q.1.
  • 892 74
  • 63/4 4
  • 3/46 0
  • 6.03/4 4.5
  • 15 4 3
  • 8(92) 88

3
Solution for mid term 1
  • Q.2.
  • char actors30
  • short betsie13
  • float chuck13
  • long double dispsea64
  • double matrixtwo100300
  • int matrixzero50 0

4
  • Q3. int j
  • for ( j 0 jlt 11 j )
  • cout ltlt j ltlt endl
  • cout ltlt j ltlt endl
  • Output
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

5
  • Q.4.
  • double firstnum, secondnum
  • cin gtgt firstnum
  • cin gtgt secondnum
  • if (firstnum gt secondnum)
  • cout ltlt firstnum ltlt is greater than or equal
    to ltltsecondnum ltlt endl
  • else
  • cout ltlt secondnumltlt is greater than ltlt
    firstnum ltlt endl
  • cout ltlt Program ends

6
  • Q.5.
  • for (i0 iltn i)
  • for (j0 jltn j)
  • bmatij.5(amatijamatji)
  • cmatij.5(amatij-amatji)

7
Structure declaration
The tag becomes the name for the new type
The struct keyword
Structure members
Terminates the structure declaration
Declares an variable named body of type testbody
8
Array of structures
9
Membership operator (.)
  • body1.temperature
  • aero2200.age

10
  • Write a C program that will ask for information
    for students of Aero220 and store the information
    in an array of structures.
  • Use the structure defined in the previous slide.
  • This will be a part of home work 6.
Write a Comment
User Comments (0)
About PowerShow.com