
Patrick B. answered 01/20/21
Math and computer tutor/teacher
using namespace std;
#include <iostream>
inline double f( double t)
{
double y = (t<0) ? ( 3 * t*t+5 ) : (-3 * t*t + 5) ;
return(y);
}
int main()
{
cout << " t y=f(t) " << endl;
for (int t=-9; t<=9; t+=3)
{
double y = f(t);
cout << t << " " << f(t) << endl;
}
}
Patrick B.
Yes, Thanks Gordon! The directions say to step by 3, so change the incrementing of the for-loop to t+=3;01/20/21