OMFG. Clearly you have no intelligence if you think AI is pre-programmed responses.
ROFL - here is a very simple example of how AI works.
#include <iostream>
#include <string>
#include <ctime>
using namespace std;
int main()
{ // Ask for the person's name cout
<< "What's your name? "; string name; getline(cin, name);
// Respond with "It's nice to meet you"
cout << "It's nice to meet you, " << name << "." << endl;
// Ask for the year they were born
int birthYear; cout << "What year were you born? "; cin >> birthYear;
// Calculate their age time_t
now = time(0); tm* ltm = localtime(&now); int currentYear = 1900 + ltm->tm_year; int age = currentYear - birthYear;
// Respond based on their age
if (age > 50) { cout << "You sure are old!" << endl; }
else { cout << "You are a youngster!" << endl; }
return 0; }
Last edited: