Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
Computer Hope forum e-mail issues and down time
0 Members and 1 Guest are viewing this topic.
#include<iostream>using namespace std;int main() { int i, n = 20; for (i=0; i<n; i--) { cout << "x" << endl; }}/*Directions:===========Find three ways to make the above code print x 20 times(by changing only one character)*/
A tip to all: The current code is an infinite loop. I'm on it, because I can't resist. EDIT: Question: Does the "--" count as one character? It's certainly only one operator...