I'm just starting out with C++ (and programming in general), and my first program is giving me problems.
Its purpose is to generate
"-10-9-8-7-6-5-4-3-2-1 12345678910" as an output, but all I get is the euquivalent of "-9 \n"
EDIT - some of that code may seem redundant at the moment, but future versions will create a set number of lines of that output.Code:#include <iostream> using namespace std; int main() { int x = -10; int tracker = 1; while (tracker != 2) { x = x + 1; cout << x; if (x = 0) { cout << " ";} else if (x = 10) { cout << "\n"; tracker = tracker + 1; x = -10;}} cin.get(); }