#define _CRT_SECURE_NO_WARNINGS | |
#include <Windows.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <iostream> | |
using namespace std; | |
float chislo(float nomer, float stepin) | |
{ | |
return (pow(nomer, stepin + 1)); | |
} | |
int main() | |
{ | |
SetConsoleCP(1251); | |
SetConsoleOutputCP(1251); | |
int y,a,b,h; | |
bool q = false; | |
float x,n; | |
cout << "Введiть дiйсне число х : \n"; | |
cin >> x; | |
do { | |
if (q != false) { | |
cout << "Дані введено не коректно\n"; | |
} | |
cout << "Введiть a b n\n"; | |
cin >> a >> b >> h; | |
q = true; | |
} while (a > b); | |
for (int i = a; i <= b; i=i + h){ | |
cout <<"y(x)="<<x<<"^"<< i+1 << "="<< chislo(x,i) << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment