15

15


#include <iostream>

#include <clocale>

#include "math.h"


float F(int, int, int,int, int, int);

float firstF(float,int,int);

float secondF(float,int);

float thirdF(float,int);

float resultF(float, int, int, int);


using namespace std;



int main(){

setlocale(LC_ALL, "Russian");

int a, b, c,xn,dx,xe;

cout << "Введите начало отрезка, шаг и конец отрезка: " << endl;

cin >> xn >> dx >> xe;

cout << "Введите значения для a,b,c: " << endl;

cin >> a >> b >> c;



return 0;

}


float f(int xn, int xe, int dx, int a, int b, int c){

float F;

for (float i = xn; i < xe; i += dx){

if (i < 5 && c != 0)

F = firstF(i, a, b);

else if (i > 5 && c == 0)

F = secondF(i, a);

else

F = thirdF(i, c);

F = resultF(F, a, b, c);

}

}


float firstF(float x,int a, int b){

float f = -a * pow(x, 2) - b;


return f;

}


float secondF(float x, int a){

float f = (x - a) / x;


return f;

}


float thirdF(float x, int c){

float f = -x / c;


return f;

}


float resultF(float f, int a, int b, int c){

if (((a | b) ^ (a | c)) == true)

f = float(f);

else

f = int(f);

}

Report Page