Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

,sxrjd / 2 / p2main

.cpp
Скачиваний:
23
Добавлен:
27.03.2016
Размер:
510 б
Скачать
#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
  • #
    27.03.2016109 б22lab2.mk
  • #
    27.03.2016943 б22lab2.mk1
  • #
    27.03.201630.81 Кб22lab2.sym
  • #
    27.03.2016508 б22lab2.tgt
  • #
    27.03.2016232 б23lab2.wpj
  • #
    27.03.2016510 б23p2main.cpp
  • #
    27.03.20163.16 Кб22p2main.obj
  • #
    27.03.2016707 б23sqeq.cpp
  • #
    27.03.2016253 б22sqeq.hpp
  • #
    27.03.20162.33 Кб22sqeq.obj