my final for my programming class....probably really easy for you guys but i have no idea and i d really appreciate some help so i dont fail this class haha
Task – write a C program that will provide an interaction similar to the following –
$./myprog
$promt> what do you want to do today? Enter 1 to sort or 2 to search (Computer)
$prompt> 1 (user)
$prompt> how big an array do you want (< 1000) (computer)
$prompt>100 (user)
$prompt>Enter 1. To provide input from keyboard, 2. Generate randomly 3. Read from a file (computer)
$prompt> 2 (user)
$prompt> Enter 1 to view the sorted array or 2. To write to a file (computer)
$prompt> 2 (user)
$prompt>File has been written to outputfile.dat
$prompt> What do you want to do today? Enter 1 to sort or 2 to search (computer back to the top)
$prompt> 2 (user)
$prompt>Is the array to be randomly generated (1) or read from a file (2) (computer)
$prompt>2 (user)
$prompt>data read from inputfile.dat (computer will read data from file - 100 integers, between 0-100)
$prompt> enter the value you want to search (computer)
$prompt>25 (user)
$prompt>3 instances found
$prompt> What do you want to do today? Enter 1 to sort or 2 to search (computer back to the top)