\(C=\frac{x^2+x+1}{x+1}=\frac{x.\left(x+1\right)+1}{x+1}=\frac{x.\left(x+1\right)}{x+1}+\frac{1}{x+1}=x+\frac{1}{x+1}\)
Để C nguyên thì \(\frac{1}{x+1}\) nguyên
=> 1 chia hết cho x + 1
=> \(x+1\inƯ\left(1\right)\)
=> \(x+1\in\left\{1;-1\right\}\)
=> \(x\in\left\{0;-2\right\}\)
Vậy \(x\in\left\{0;-2\right\}\) thỏa mãn đề bài