Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "rus");
- cout << "Введите размер массива: ";
- int n;
- cin >> n;
- if(n % 2 == 1){
- cout << "Массив не может быть нечетного размера";
- return 0;
- }
- double arr[n];
- cout << "Вводите аргументы, затем значения функции: " << endl;
- for(int i = 0; i < n; i++){
- cin >> arr[i];
- }
- cout << " x y(x)" << endl;
- for(int i = 0; i < n / 2; i++){
- cout << setw(5) << arr[i] << setw(5) << arr[i + n / 2] << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment