How can i make simple assistant using cpp. May anybody guide me. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How can i make simple assistant using cpp. May anybody guide me.

29th Mar 2019, 2:12 PM
Aman Kumar
Aman Kumar - avatar
4 Answers
+ 6
It needs to be an interactive q&a program, using cin stream for input and cout stream for output. For a simple program you may embed all knowledge in a program and not a database or file. You could use a menu driven system for user input. Testing on codeplayground will be tricky as interactive responses are not supported here.
30th Mar 2019, 12:45 AM
Sonic
Sonic - avatar
+ 2
How is this
30th Mar 2019, 1:51 AM
Aman Kumar
Aman Kumar - avatar
+ 1
// Added full guide // Simple calculator+calculator+Table+squareroot+square #include <iostream> #include <conio.h> #include <string> #include <ctime> #include <math.h> using namespace std; int main () { string name1; cout<<"Enter your name"<<name1<<endl; cin>>name1; if (name1=="Aman"||name1=="Karan"||name1=="aman"||name1=="karan"||name1=="Gaurav"||name1=="gaurav") { cout<<"Good Afternoon Sir!"<<endl; } string name2; cout<<"What's is the order?"<<name2<<endl; cout<<"Things that you can do:"<<endl; cout<<"1. Enter 'Day' if you want to know Today's day"<<endl; cout<<"2. Enter 'Calculator' if you want to do calculations"<<endl; cout<<"3. Enter 'Table' to know the multiplication table of certain number"<<endl; cout<<"4. Enter 'Squreroot' to know square root of cartain number"<<endl; cout<<"5. Enter 'Square' to know square of certain number"<<endl; cin>>name2; if (name2=="Day"||name2=="day"||name2=="Time"||name2=="time") { time_t tt; struct tm * ti; time(&tt); ti = localtime(&tt); cout<<"
30th Mar 2019, 1:51 AM
Aman Kumar
Aman Kumar - avatar
+ 1
Will you make it more better'
30th Mar 2019, 1:52 AM
Aman Kumar
Aman Kumar - avatar