Iam writing a script for my sisters friends little brother
i want the program to say hello lets say his name is Joe and ask him how he is and he can write a reply back saying fine and then it replys "Iam happy you are (his response) today
and then it goes into a basic math where he can put in a number hit enter put in another number and then it tells him the awnser.
Its to work on a win 98 machine and in C or Perl if it has to be
Ok - I don't know C, but i know the groundwork to Perl - so here's one Perl solution:
#!/usr/bin/perl
print "\nHello Joe, how are you today? ";
chomp( $feelToday = <STDIN> );
print "\nI am happy you are $feelToday today.";
print "\nLet's do some math. What's your first number? ";
chomp( $firstNumber = <STDIN> );
print "\nWhat's your second number? ";
chomp( $secondNumber = <STDIN> );
$mathResult = $firstNumber + $secondNumber;
print "\nThe math result is $mathResult!\n\n";
Just put it in a script, make it executable and run it. Just make sure the first line points to the location of your Perl executable on your system!