ENGR 121 Lecture 3: Lecture Notes 3

43 views2 pages

Document Summary

Breaking the solution into steps and refining each one. Consists of functions that implement each step. New script icon in the toolbar opens up a script editor bar (easier to edit codes here than in the command window) Taking the average of the elements after removing the minimum and maximum scores (like in diving, to prevent bias/skew data) Finding the 3 sides of a triangle when given b,c and a. (cid:1853)=(cid:1854)2+(cid:1855)2 2 (cid:1854) (cid:1855) (cid:1855)(cid:1867)(cid:1856)(cid:4666)(cid:1853)(cid:1868) (cid:1853)(cid:4667) fprintf( the third side is %. 2d\n, sqrt a) Frprintf print format to a file name ( ") %. 2d is a placeholder for the value you want to display (rounded to 2 digits after the decimal point. Sqrt(a) is the value ( (cid:1853)) that will be displayed in %f. \n indicates to begin a new line after displaying sqrt a. User-defined functions (assumes from the beginning) (writing to, but starting at the end)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers