VB icon

computalk

Email
Submitted on: 1/1/2015 5:10:00 AM
By: Andrew Bright (from psc cd)  
Level: Beginner
User Rating: By 10 Users
Compatibility: C++ (general)
Views: 752
 
     Make your computer talk
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
//**************************************
// Name: computalk
// Description:Make your computer talk
// By: Andrew Bright (from psc cd)
//**************************************

#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <bios.h>
main()
{
	clrscr();
	int choice;
	int choice2;
	int choice3;
	char FirstName [20];
	cout << "Hi this is your computer talking\n What is your name" << endl;
	cin >> FirstName;
	clrscr();
			cout << "Hello " << FirstName << " what would you like to do now" << endl;
			cout << "\nMenu\n\n 1)EXIT \n 2) Keep talking to me" << endl;
			cin >> choice;
			switch ( choice ) {
				case 1:
				clrscr();
				cout << " ok bye " << FirstName << " talk to you later" << endl;
				cout << "Press Alt + F4 to continue to windows" << endl;
				break;
				case 2:
				clrscr();
				cout << "what would you like to talk about?" << endl;
				cout << "\nMENU\n\n 1) Talk about me \n 2) Talk about you" << endl;
									}
					cin >> choice2;
					switch ( choice2 ) {
					case 1:
					unsigned memory_size;
					memory_size = _bios_memsize();
					printf("RAM size = %dk\n", memory_size);
					break;
					case 2:
					clrscr();
					cout << "ok, if you had the oppertinity to do one thing from this list\n what would you do?" << endl;
					cout << "\nMENU\n\n 1)Go to bed\n 2)Watch TV\n 3)Go to the cinema\n 4)Have flying lessons\n 5)Go on holiday\n 6)Other" << endl;
					cin >> choice3;
					switch (choice3) {
					case 1:
					cout << "That shows that you are lazey " << FirstName << endl;
					break;
					case 2:
					cout << "That shows that you do not get out enough " << FirstName << endl;
					break;
					case 3:
					cout << "That shows that you have a good social life " << FirstName << endl;
					break;
					case 4:
					cout << "That shows that you have a good sence of adventure " << FirstName << endl;
					break;
					case 5:
					cout << "That shows that you have a lot of charictor " << FirstName << endl;
					break;
					case 6:
					cout << "ok" << endl;
					break;
										 }
					break;
					return 0;
											 }
}


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.