Online C++ Compiler

#include<iostream> using namespace std; void getNNumbers(int n, int d) { for (int i = 0; i < n - 2; i++) cout << 1 << " "; cout << 2 << " "; cout << n + d << endl; } int main() { int N = 5, D = 8; getNNumbers(N, D); }