I have a TI-84 Plus SE and I am learning TI BASIC, your site has been quite helpful to understend some of the potencial of this programming mode, I have a problem with some programm I need to compile in my TI 84SE, it is written in C++ anyway this is the complete code of the program I wish to compile in TI BASIC.... but my problem is in the while loops..
Code:
Code:
#include <iostream.h>
#include <conio.h>
#include <math.h>
double f(double x);
void main()
{
double a,b,I,resp;
cout << "Program to integrate the function\n";
cout << "0.2 + 25x - 200x^2 + 675x^3 - 900x^4 + 400x^5, \n";
cout << "Using Trapecious Simple Rule\n" << endl;
do
{
cout << "\nPlease enter the limits\n";
cout << "Lower limit:";
cin >> a;
cout << "Upper limit:";
cin >> b;
cout<<"Are the values correct?(0=yes,1=no)?";
cin>>resp;
}while(resp==1); // FROM HERE ONWARDS IS MY CONFUSION
I=(b-a)*((f(a)+f(b))/2);
cout << "\nThe answer is: " << I << endl;
getch();
}
double f(double x)
{
return(0.2+25*x-200*pow(x,2)+675*pow(x,3)-200*pow(x,4)+400*pow(x,5));
}