i was experementing with the hello world app and made a talk bot its not done it needs alot of work but if you mess with it mabye someone will learn a thing or two from it--Heres code:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TalkBot
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello im Smart Pc, Whats your name?");
string dname = Console.ReadLine();
Console.WriteLine("Nice to meet you " + dname);
bool Questionanswered = false;
bool IsBoy = false;
while (!Questionanswered)
{
Console.WriteLine("Are you a boy or a girl?");
string tmp = Console.ReadLine();
if (tmp == "boy" || tmp == "girl")
{
Questionanswered = true;
IsBoy = (tmp == "boy");
}
}
if (IsBoy)
Console.WriteLine("Hello Sir");
else
{
Console.WriteLine("Well, hello Maam");
}
Console.WriteLine("How are you ? good or bad?");
string aname = Console.ReadLine();
bool QuestionAnswered = true;
bool IsBad = false;
while (!QuestionAnswered)
{
Console.WriteLine("good or bad ?");
string tmp = Console.ReadLine();
if (tmp == "bad" || tmp == "good")
{
QuestionAnswered = true;
IsBad = (tmp == "bad");
}
}
if (IsBad)
Console.WriteLine("Why whats wrong?");
else
{
Console.WriteLine("Well nice to hear you are doing good");
}
}
}
}