Halloween!

NOTE: If you are a user of this site ignore this.


1. Press the gear icon at the top right of this code box.
2. Refresh page if you don't see gear icon.
3. Press run after you get on the website.
4. If it doesn't work refresh and press run again.


Enjoy!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>
#include <string>
#include <thread>
#include <chrono>
void HappyHalloween();
void pause(const int&);
int main()
{
	for (int n = 3; n != 30; n += 3)
	{
		HappyHalloween();
		for (int i = 0; i != n; ++i)
		{
			std::cout << ' ' << std::flush;
		}
	}
	return 0;
}
void HappyHalloween()
{
	std::string hal = "Happy Halloween!";
	for (const auto &c : hal)
	{
		std::cout << c << std::flush;
		pause(75);
	}
	std::cout << std::endl;
}
void pause(const int &milli)
{
	using std::this_thread::sleep_for;
	using std::chrono::milliseconds;
	sleep_for(milliseconds(milli));
}
Last edited on
No. I'm using this to create a usable link for people who don't have C++ compiler. Using it for other purposes. Why do you think I marked it solved right away...
Such a kid program I guess.

Don't be an asshole.

Edit - I apologise for the comment I made above, I acted very immaturely.
Last edited on
Topic archived. No new replies allowed.