Presentation is loading. Please wait.

Presentation is loading. Please wait.

ENGR 3 rocks. How do you want the review session for the final?

Similar presentations


Presentation on theme: "ENGR 3 rocks. How do you want the review session for the final?"— Presentation transcript:

1 ENGR 3 rocks

2 How do you want the review session for the final?

3 MATLAB ! – It’s actually a fancy C program (user friendly) – Runs on linux.engr.ucsb.edu – Runs on your windows or mac computer too – Costs $1,000s (up to 10s of $1000s) but for students it’s cheap! – The help files are AWESOME! – Only two disadvantages…..

4 #include int main () { int N, D, maxD, bestN=3, bestD=1; float pi=3.1415926; scanf(“Enter”,&maxD) for (D=1;D<=maxD;D++){ if(fabs(pi-(float)bestN/bestD)>fabs(pi-(float)N/D)){ bestN=N; bestD=D; } printf(“The best N was %f”,N);

5 #include int main () { int N, D, maxD, bestN=3, bestD=1; float pi=3.1415926; scanf(“Enter”,&maxD) for (D=1;D<=maxD;D++){ if(fabs(pi-(float)bestN/bestD)>fabs(pi-(float)N/D)){ bestN=N; bestD=D; } printf(“The best N was %f”,N);


Download ppt "ENGR 3 rocks. How do you want the review session for the final?"

Similar presentations


Ads by Google