This example code i have was given to me by my teacher, she wanted me to learn from it. I didnt take it from anywhere else.Thank you guys anyways i figured out my code. You guys were very helpful.
Type: Posts; User: douglas481
This example code i have was given to me by my teacher, she wanted me to learn from it. I didnt take it from anywhere else.Thank you guys anyways i figured out my code. You guys were very helpful.
Its not like that at all, i am trying to work with things im not fully comfortable with. By someone guiding me in the right direction then i will be learning how it all works.
I found an example code that is doing similar functions that i am supposed to do, I just dont really know how to change the code so it applies to my code.
Any ideas??
//included libraries...
input file is
3
Abdul Rachel
Lopez Charlie
Schofield Theo
by writing kyle richards and the new employee, im trying to get an output like this.
Rachel Abdul
disregard that printf("%s", new_employee); that not on my code
I have all of this done so far but having trouble going on the next part, any ideas??
I will need to ask the user for the first and last names of the new employee.
Then, you will need to...
I see i looked through some examples and this is what i came up with, still a little shaky.
#include <stdio.h>
#include <string.h>
struct record{
char fname[20];
Should i take off the record out of the functions
Ok so I think this is how the for loop should go, i probably made some mistakes. thanks for your help :)
#include <stdio.h>
#include <string.h>
struct record{
char fname[20];
Now the next step seems very confusing to me how i would go about setting up this for loop, any ideas??
dumb mistakes its like this now fscanf(ifp, "%d", &num_people);
Ok i understand, I believe now that part should be okay.
#include <stdio.h>
#include <string.h>
struct record{
char fname[20];
i forgot a period .lname
I believe its this way, hopefully i got it right??
#include <stdio.h>
#include <string.h>
struct record{
char fname[20];
okay here is my new code, i left out something on the first tweo scanf because i dont know how i would save the new employee's name.
#include <stdio.h>
#include <string.h>
struct record{...
Need some direction on this project, I have this so far but dont know where to go from here, heres the input file im reading from.
3Abdul Rachel Lopez Charlie Schofield Theo I will need to ask...
I didnt steal the code from anyone, i only changed the things in my code that were said in this thread. I was able to finally write the whole code the way i wanted to thanks for everyones help.
ok so i changed several things and i now got this code.
im getting an output like this:
Player 1 score 7
Player 2 score -3
Breakdown: 1 0 1 0 2 -1 0 3 0 0 0 0 1 0 -2 0 2 0
Breakdown: 1 -1 0...
I sort of understand what cuzah means when he says i need to be looping through the array. I dont have much clue to how i actuallly do that.
My code is down below. I trying to get an output from this input file input.txt.
This is a golf game and the first row is the number of golfers,
second row is the par and the last two rows are...