d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > C Projects - Offering Fg > Iso Help
Add Reply New Topic New Poll
Member
Posts: 5,935
Joined: May 3 2010
Gold: 93.00
Mar 14 2018 02:50pm
The first few programs in this class were fairly simple to wrap my head around, but the last 2 just seemed to launch right into the deep end, and I am lost.
So, in hopes of salvaging my GPA, I'd appreciate some help in putting together this one program using two arrays and a header file. If interested in helping, PM me or post in here, I can provide
full program details/requirements.

Thank you.
Member
Posts: 108
Joined: Jan 24 2009
Gold: 373.85
Mar 14 2018 07:19pm
i'm interested
Member
Posts: 2,629
Joined: Mar 7 2018
Gold: 2,586.00
Mar 15 2018 01:17am
Post program specs
Member
Posts: 5,935
Joined: May 3 2010
Gold: 93.00
Mar 15 2018 09:50am
Write a program to manipulate data in an array

Should begin with the prompt:

"DATA CONFIRMATION AND UPDATE PROGRAM WRITTEN IN C"

"Program written by XXXXXX."
"Program compiled on XXXX at XXXX."

"Here is what data set 1 looks like now:"
[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ]
4 7 6 32 5

"Here is what data set 1 looks like now:"
[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ]
98 47 26 99 187

"which data set do you want to work with [ 1 or 2 ]:"


Create the two arrays in a new header file and initialize them to the values shown.
Make the arrays to hold the data 20 elements long, using a symbolic constant to set that value.

After the user selects one of the data sets to work with, allow them to keep interacting with that
data set until they indicate they want to change it.

Offer the user the following menu

"DATA CONFIRMATION AND UPDATE PROGRAM"
1. Display data set now.
2. Delete an entry from the data set.
3. Add an entry to the end of the data set.
4. Change an existing entry.
5. Quit this program.
"Enter choice [ 1-5, 0 = change data set]:"


Each of these should be done in its own function. Cohesiveness counts!

For the display data set, use the same function you wrote that displays it when the program
begins.

For deleting an entry, prompt the user with

"Which entry do you want to delete [ 1-5, 0=return to Menu ]:"

and allow them to enter a 1, 2, 3, 4, or 5, or a zero, which will do nothing and return to the main
menu. After you remove the element, move the remaining elements over to fill in the hole. For
example,

"Here is what data set 1 looks like now:"
[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ]
4 7 6 32 5


"Which entry do you want to delete [ 1-5, 0=return to menu ]: 3
Deleting entry 3."

"Here is what data set 1 looks like now:"
[ 1 ] [ 2 ] [ 3 ] [ 4 ]
4 7 32 5


Note that when we display the elements, we start with entry 1, not zero. Internally, of course, you
need to be aware that our arrays always start with element 0.


Adding an entry will just put a value at the end of the list.

Changing an existing entry will allow the user to directly modify a value that's already there.

"Here is what data set 1 looks like now:"
[ 1 ] [ 2 ] [ 3 ] [ 4 ]
4 7 32 5


"Which entry do you want to change [ 1-4, 0=return to menu ]: 3
Existing entry 3 has the value 32."

"New Value: 94"

"Entry 3 now has the value 94."
"Here is what data set 1 looks like now:"
[ 1 ] [ 2 ] [ 3 ] [ 4 ]
4 7 94 5








***I tried to format it so the prompt displayed by the program appears in quotes and the lab text itself falls respectively inbetween each section***

I have one header file already that I can use to display the programmer, date and time portion.
Let me know if I can clarify further.

This post was edited by JabbyG on Mar 15 2018 09:52am
Member
Posts: 26,765
Joined: Mar 26 2007
Gold: 0.59
Mar 15 2018 10:39am
"Program written by XXXXXX."

Insert d2jsp coders nickname here
Member
Posts: 2,629
Joined: Mar 7 2018
Gold: 2,586.00
Mar 15 2018 11:51am
What kind of help do you expect ? Full program code source ? Extra explanations and follow up to understand it ? Or only support for programming it ?

If you really want to learn coding, you need to understand it.

If you want i can help you to put it up in this thread. I won't say no if you give me some fg for it, since i'm new and a bit short of it :)

Please edit your specs post and add your header and main file to check what you are using so far. Been a long time since i coded in C ;)

This post was edited by Adpist on Mar 15 2018 12:05pm
Member
Posts: 108
Joined: Jan 24 2009
Gold: 373.85
Mar 15 2018 12:57pm
i sent you some code. let me know if you have questions
Member
Posts: 11,273
Joined: Apr 26 2008
Gold: 3,303.50
Mar 24 2018 05:14pm
lmk if still need help
Member
Posts: 23,518
Joined: Aug 3 2011
Gold: 3,575.00
Apr 26 2018 02:57pm
Quote (bipolargod @ Mar 15 2018 09:39am)
"Program written by XXXXXX."

Insert d2jsp coders nickname here


:rofl:
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll