{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture12 - Engineering Computation ENG 1D04 Lecture 12...

Info icon This preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Engineering Computation ENG 1D04 Lecture 12: some review… Mihai Albu
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
© Copyright 2008 Alan Wassyng & Mihai Albu 1
Image of page 2
© Copyright 2008 Alan Wassyng & Mihai Albu 2
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
© Copyright 2008 Alan Wassyng & Mihai Albu 3 Question 1. 2 marks How do you pass the 1D04 course? Answer 1. A. Drink a lot of beers B. Cheat on labs, quizzes and exams C. Practice, practice & practice D. A and B only E. None of the above
Image of page 4
© Copyright 2008 Alan Wassyng & Mihai Albu 4 Variables int x; x = 5; x = 11 / 3; // x = 3 x = (int) Math.Sqrt(7); //x = 2 Rounding down
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
© Copyright 2008 Alan Wassyng & Mihai Albu 5 Variables double y; y = 5.3456; y = 11 / 3; //y = 3 y = Math.Sqrt(7) ; //y = 2.646 Explicit conversion
Image of page 6
© Copyright 2008 Alan Wassyng & Mihai Albu 6 Variables double y; y = 5.3456; y = (double)11 / 3; //y = 3.666 y = Math.Sqrt(7) ; //y = 2.646
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
© Copyright 2008 Alan Wassyng & Mihai Albu 7 Variables double y; y = 5.3456; y = 11.0 / 3.0; //y = 3.666 y = Math.Sqrt(7) ; //y = 2.646
Image of page 8
© Copyright 2008 Alan Wassyng & Mihai Albu 8 Maths int x = (int) Math.Sqrt((Math.Pow(3,2) + 3) / (int) (1 + 4.5 / 1.5)); int x = (int) Math.Sqrt((9 + 3) / (int) (1 + 4.5 / 1.5)); int x = (int) Math.Sqrt((9 + 3) / (int) (1 + 3)); int x = (int) Math.Sqrt(12 / 4); int x = (int) Math.Sqrt(3); int x = 1;
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
© Copyright 2008 Alan Wassyng & Mihai Albu 9 Strings String s = “I love this course”; MessageBox.Show(s); MessageBox.Show(s + “ 1D04”);
Image of page 10
© Copyright 2008 Alan Wassyng & Mihai Albu 10 Strings String s = “I love this course”; String s1 = “ABCD”; MessageBox.Show (s + " " + 9 / 9 + s1.Substring(3, 1) + Math.Sqrt(16).ToString ("00!"));
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern