Advertisement
7_2009-2012 Miscellaneous #224263

Fool Your Friends -- for beginners

Make your friends think that their harddrive will be formatted. You print "Hit Q to quit:" and when they try to hit 'Q' a 'Y' pops up... Of course, we won't really format or anything. Vote if you enjoy the code :) BTW, to really close the program you must hit ESC.

AI

Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Codice sorgente
original-source
#include <conio.h>
#include <iostream>
using namespace std;
int main() {
	cout << "Windows 98 Setup will now format your hard drive...\n"
		"You will lose all files and settings currently configured\n"
		"on this hard drive. If you do not want to format, it is\n"
		"strongly recommended that you cancel Windows 98 Setup...\n\n"
		"If you decide to cancel during format, type EXIT.\n\n"
		"Press any key to format, or press 'Q' to quit setup: ";
	int ch;
	ch = getch();
	cout << "Y\n\n\a\a\aNow formatting . . . \n\n";
	while ((ch = getch())) 
		if (ch == 27)
			break;
		else
			cout << char(ch+12);
	return 0;
}
Upload
Commenti originali (3)
Recuperato da Wayback Machine