Dec 16, 2013 at 10:31pm UTC
#include "stdafx.h"
#include < iostream >
using namespace std;
int main()
{
int n = 6000000;
while (n > 0) {
cout << n << ", ";
--------------------n;
}
cout << "Takeoff!\n";
cin.get();
}
Is there a way I can get it to decrease by 100's without putting 200 '-' marks
Dec 16, 2013 at 10:37pm UTC
Wow, I'm amazed that's actually valid syntax. For future reference, don't do this. Instead, use normal assignment:
1 2
n = n - 100; //or
n -= 100;
Last edited on Dec 16, 2013 at 10:38pm UTC
Dec 16, 2013 at 10:41pm UTC
It's not a good idea just because you'll have to count all those symbols to figure out how many times you are actually deprecating...
Dec 16, 2013 at 10:46pm UTC
Ohhhh ya haha
i also have another question.
is there a way I could put this one code onto a flash drive and be able to plug into someone else's computer and immediately run the code?