The Eversoft Eraser Company has a list of its customers' names ( not necessiarly in alphabetical order)and telephone numbers in a file named customers with records of the following form:
last name, first name, phone number
A. allow the user to input a last name: then search the file and display all names and phone numbers corresponding to that last name
B. load the file into parallel arrays and display the list of customers' names and phone numbers in alpahbetical order.
This is part of the code i have came up with so far and i can't seem to get it to work:
Declare Last Name as String
Declare First Name as String
Declare Phone Number as Integer
Open “LastName, FirstName,PhoneNumber” For Output As NewFile
Write “FirstName,LastName, and PhoneNumber”
Write “Enter 0 For All When Done”
Input LastName, FirstName, PhoneNumber
While Name !=”0”
Write NewFile, Name, Number
Write “Enter Name, Number.”
Write “Enter 0 For Both When Done.”
Input Name, Number
End While
Close NewFile
I cant seem to come up with the rest of the file and need some help with it
1 Replies - 672 Views - Last Post: 28 September 2012 - 01:59 AM
#1
using loops, conditionals, and file processing concepts
Posted 28 September 2012 - 01:36 AM
Replies To: using loops, conditionals, and file processing concepts
#2
Re: using loops, conditionals, and file processing concepts
Posted 28 September 2012 - 01:59 AM
Lynwood, on 28 September 2012 - 02:06 PM, said:
The Eversoft Eraser Company has a list of its customers' names ( not necessiarly in alphabetical order)and telephone numbers in a file named customers with records of the following form:
last name, first name, phone number
A. allow the user to input a last name: then search the file and display all names and phone numbers corresponding to that last name
B. load the file into parallel arrays and display the list of customers' names and phone numbers in alpahbetical order.
This is part of the code i have came up with so far and i can't seem to get it to work:
Declare Last Name as String
Declare First Name as String
Declare Phone Number as Integer
Open “LastName, FirstName,PhoneNumber” For Output As NewFile
Write “FirstName,LastName, and PhoneNumber”
Write “Enter 0 For All When Done”
Input LastName, FirstName, PhoneNumber
While Name !=”0”
Write NewFile, Name, Number
Write “Enter Name, Number.”
Write “Enter 0 For Both When Done.”
Input Name, Number
End While
Close NewFile
I cant seem to come up with the rest of the file and need some help with it
last name, first name, phone number
A. allow the user to input a last name: then search the file and display all names and phone numbers corresponding to that last name
B. load the file into parallel arrays and display the list of customers' names and phone numbers in alpahbetical order.
This is part of the code i have came up with so far and i can't seem to get it to work:
Declare Last Name as String
Declare First Name as String
Declare Phone Number as Integer
Open “LastName, FirstName,PhoneNumber” For Output As NewFile
Write “FirstName,LastName, and PhoneNumber”
Write “Enter 0 For All When Done”
Input LastName, FirstName, PhoneNumber
While Name !=”0”
Write NewFile, Name, Number
Write “Enter Name, Number.”
Write “Enter 0 For Both When Done.”
Input Name, Number
End While
Close NewFile
I cant seem to come up with the rest of the file and need some help with it
If you can tell us what language this is, we may be in a better position to help you.
regards,
Raghav
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|