Добавил:
Upload
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:
#include <stdio.h>
#include <iostream.h>
#include "sqeq.hpp"
int main(){
double a, b, c; // declaration
double x1, x2; // declaration
int res;
cout << "Enter coefficients\n";
cin >> a >> b >> c;
res = sqeq(a, b, c, &x1, &x2);
cout << "The type is: " << res << "\n";
if( res > 0 && res < 4 ) cout << "root 1: " << x1 << "\t root 2: " << x2 << endl;
if( res == 4 ) cout << "Re: " << x1 << "\t Img: " << x2 << endl;
getchar();
return 0;
}
Соседние файлы в папке 2