Witam, napisałem taki w miarę (według mnie) zaawansowany programik, który ma mi pomóc w rozwiązywaniu pewnego rodzaju zadań na matematyce. Mianowicie liczenie delty, x0, x1, oraz x2 z wartości a, b, c funkcji kwadratowej. Wszystko ok, pomęczyłem się z tym jakieś 3h i w końcu się udało. Program działa i liczy co należy. Teraz główna treść mojego pytania: Czy jest sposób aby wykorzystać ten program na telefonie Galaxy S4 z Androidem? Było by to bardzo pomocne, gdyż mogę podczas lekcji korzystać z kalkulatora lub telefonu z kalkulatorem. Z góry BARDZO dziękuję.
Mój program od wewnątrz:
#include <iostream>
#include <windows.h>
#include <stdio.h>
#include <cmath>
using namespace std;
int a, b, c;
float x1, x2, x0, delta;
string k, n;
int main()
{
cout << "Witaj, wprowadz wartosci a, b, c funkcji kwadratowej, a ja podam Ci:"<<endl<<endl;
cout << "Delte:"<<endl;
cout << "x0:"<<endl;
cout << "x1:"<<endl;
cout << "x2:"<<endl<<endl<<endl<<endl;
do
{
cout<<endl<< "Wprowadz wartosc dla a: ";
cin >> a;
cout << "Wprowadz wartosc dla b: ";
cin >> b;
cout << "Wprowadz wartosc dla c: ";
cin >> c;
cout <<endl<<endl;
delta = (b*b) - 4*a*c;
if ((delta==0)&&(n=="y")||(n=="Y"))
{
x0 = -b / (2*a);
cout << "Delta="<< delta <<endl;
cout << "x0="<< x0 <<endl;
cout << "x1=brak"<<endl;
cout << "x2=brak"<<endl<<endl;
cout << "Czy chcesz kontynuowac? (Y/N)"<<endl;
cin >> n;
getchar();getchar();
}
x1 = (-b - sqrt (delta)) / (2*a);
x2 = (-b + sqrt (delta)) / (2*a);
cout << "Delta="<< delta <<endl;
cout << "x1="<< x1 <<endl;
cout << "x2="<< x2 <<endl<<endl;
cout << "Czy chcesz kontynuowac? (Y/N)"<<endl;
cin >> k;
} while ((k=="y")||(k=="Y"));
return 0;
}