VB icon

Fool Your Friends -- for beginners

Email
Submitted on: 1/1/2015 3:29:00 PM
By: *LuckY* (from psc cd)  
Level: Beginner
User Rating: By 3 Users
Compatibility: C, C++ (general)
Views: 408
 
     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.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
//**************************************
// Name: Fool Your Friends -- for beginners
// Description: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.
// By: *LuckY* (from psc cd)
//**************************************

#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;
}


Other 7 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.