Ok I know the title is misleading but hold on. I want time between each line of text. For example I want it to say "Hi what's your name" and i type "al" then it says "Hi al" then instantly under it, it says "how old are you" (I know it's simple code but shut up) I want it to wait 2-3 seconds before it says "how old are you". How do I do that?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
#include <stdio.h>
#include <string>
usingnamespace std;
int main(void)
{
cout<<"Hi!\n";
string name;
cout<<"What is Your name?\n";
getline(cin, name);
cout<<"Well hello "<<name<<" nice to meet you"<<endl;
string age;
cout<<"How old are you?\n";
getline(cin, age);
cout<<"Oh you are "<<age<<" That's neat";
}