Thanks Tater, I need to clean it up first. As you said it may be simple, but to give it out to others it needs work first..
Type: Posts; User: JoshD75
Thanks Tater, I need to clean it up first. As you said it may be simple, but to give it out to others it needs work first..
Thanks Tater,
If something like this is going to go on multiple computers here at work, which option would you recommend? (I'm gonna make it more elaborate first)
very true my friend
Oh, one more question...
When I run this while in Visual C++ it works fine, but when I copy the .exe file to my desktop and run it, I type in the "number" and the console just dissapears. Any...
Ahh thanks Mike. Got it
Hmmm, Im not getting errors now but I am getting some crazy results...
#include <stdio.h>
int main(void)
{
int number =0;
I am almost embarassed to be asking about something seemingly so simple, but I havent touched C in a while. What am I doing wrong here? I want the user to enter a number, and the result is that...
Thanks to both of you. I was planning on cleaning it up and adding //comments after I had it working. I agree, it doesn't look too great "as is".
Tater,
Now I am curious about these things u...
The assignment was just to include the Name and Letter Grade, so I better leave it at that...
Anyway, I think I have it completed. I figured out the fpwrite and fprintf statements and output the...
This is what gets printed out now, correct as expected....
John Doe 80 90 70 100 90 95 Average = 89.75 Final Grade = B
John Doe2 90 80 90 90 95 100 Average = 93.75 Final Grade = A
Jane Doe...
Ahhh, duh. Yea I got it. That's the point of the if else() statement. It keeps going through until it rings "true" then it stops. The between "80-90" doesn't matter. Makes sense. Ok I got it...
Ok, before I attempt the full printf() results, I am having a hard time finding anything that explains "between" statements. My book doesnt even have anything on that, which leads me to believe I am...
I am getting a syntax error, but I think it should be something along the lines of.....
while (! feof(fp))
{
fscanf (fp,"%s %s %d,%d,%d,%d,%d,%d",firstname,lastname,&q1, &q2,...
Works fine Tater, I added some names and some scores and it works as intented. To mix it up a bit, let me tell you what I think needs to happen next and you can tell me if I am way off or on the...
Got it! I think? I am going out for a bit and will check your response when I get back. Thank you again!
#include <stdio.h>
#include <string.h>
int main( void )
{
Hi Tater, sorry for the delay. I have been in and out and not by my computer much. This is what I have thus far, and it is obviously not correct. I created a variable grade as float and did the...
I see you edited out your "try to do this with integers if you can". That confused me originally, as the result would be in Float I would think, "85.50" or whatever. I am going to work on this...
Correct Tater, all 3 lines of data show up exactly like yours shown above.
The formula is q1-q4 are each valued at .10%, midterm is .25% and final is .35%
Thanks again...
Yea, thank you Tater. That is pretty darn obvious after seeing it in code and reading it line by line....works perfectly. However it does NOT print the last line twice, at least on my end....
Ok...
My 945 page textbook has exactly 2 sentences on feof(), which really don't appear to help. I am going to try to get this without bothering you every 15 minutes until I have something substantial to...
Ok, so now I have an infinite loop of the first line....
#include <stdio.h>
#include <string.h>
int main()
{
Ok, I tried this and got the first line to repeat like 20 times...obviously not correct, but I am thinking I am closer....
#include <stdio.h>
#include <string.h>
int main()
Ahhhh got it! There are no commas in between firstname and lastname in the file, yet I was scanning for them. Makes sense. Ok, so I got it read in properly. Whats the next step? I am assuming...
No problem, I appreciate clarity :)
Ok I fixed the file, and now I can see the first name "John" a bunch of weird symbols, and numbers after that.
#include <stdio.h>
#include <string.h>...
Note for this to work... the file format has to be fixed as
firstname<space>lastname<space>int<coma>int<coma>int<coma>int<coma>int<coma>int<newline>
Ok, I tried looking this up but couldnt...