Example3 - check the new value of the function versus max...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Quiz 3: FOR Loops ASE 201 (13594) Write the code that will calculate the values of the following function f ( t ) = - ( t - 5) 2 + 3 for t from 0 to 10 with a step of 0.1. Also, determine the maximum value attained by the function. (Hint: declare a variable max and on each iteration
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: check the new value of the function versus max and update accordingly.) After getting the values, plot the function and print the maximum value with an appropriate label. NOTE THAT YOU ARE NOT ALLOWED TO USE ARRAY ARITHMETIC, ONLY FOR LOOPS....
View Full Document

Ask a homework question - tutors are online