Edit: Never mind. Found my mistake.
Thank you so much for your help! :)
Type: Posts; User: Chinnie15
Edit: Never mind. Found my mistake.
Thank you so much for your help! :)
Ugh, thanks. It's been a few weeks since we've done this, and I thought I was remembering correctly. I'll go back and review my old programs/notes, and will be back if I have more issues. Thanks!
Hello everyone. I am a little stuck on my project that I am working on. I am almost done, but this save file is the problem. I have to give the user an option to save what their results of the...
Thank you! :) I got it!
I had to write a program that opens a file, reads a list of doubles, and then averages them. The result SHOULD be 40 something (i don't remember exactly and don't have time to average them again...
I got it!!! Thank you guys sooo much! :D
Here is the finished code. I also went ahead and did the smallest number as well.
# include <stdio.h>
int main()
Oh, I can do that? This is what it says in my notes:
Would this be considered a different scenario, though? That's the only reason I didn't try it.
Thanks! :)
It's a .txt file and it looks exactly like this:
23 11 22 98 55 35 43 8 60 31 59 27 95 19 2 81 94 5 47 20
Hmm, would I not use an array maybe? But, I also can't see declaring 20 different...
Hello. I have a program that I have to write that reads 20 ints in from a file and then lists the greatest and smallest ones. For right now I'm just trying to make it run to get the largest number,...
Kentric:
I didn't put an '&' because I was taught that you do not need one when you are working with arrays (both & and arrays point to a memory location).
rags_to_riches:
Thanks for your...
Hello!
I just completed writing a program to ask a user for 2 words, pass them into a function, and use strcmp to let the user know which word is larger (or if they are equal). The program...
Thank you! :) And yes, the reason I put the double parenthesis there is because the compiler wasn't happy. But, for some reason, I thought that would fix the problem too (I thought it was either use...
Hello!
I am stuck on this program I have to write for the days of the week. The days of the week is in a string array, and the program asks the user for a number between 1 and 7. The program is...
Thank you guys!!! You put me on the right track. I got it! :)
# include <stdio.h>
/*prototypes*/
double find_average(double *array, double size);
int main()
I am honestly not sure. I have only that model to go off of. In class, he said, "Oh, and here are a few models you can refer to later", and that was it. And, according to what was given, I thought...
Ok, I realize I just asked for help, but I am so confused right now. I have been working for the past hour on another problem (which is just an add on to the last one I posted about), and I know I am...
Yup, I got it! :) Thanks! It's working now!
Ick, didn't work. :( This is the output I am getting:
The grades are:
0.0,0.0,0.0,0.0,0.0,
Thank you for your help! :)
I am writing a program for my programming class and I have run into a problem. I got the entire program completed/compiled, but for the output, it's printing only zeros?
This is the HW problem:
...
Thank you! That's what I thought I had to do, but the way it was worded I thought it would be wrong. I've got it now! :)
Hello!
So, I am completely stuck on my last HW problem. This is the problem it gives to me:
Change the printNumber method :
Change the code INSIDE the method to have it RETURN the...
I got it! :D It's all coming out right, but hopefully the code makes sense.
# include <stdio.h>
# include <math.h>
int main()
{
Oops! Well, if it means anything I meant to remove the first stated Pythagorean theorem after I put it in the if statement. I just forgot to remove it. But yeah, I did define it twice differently...
Hello again!
I am having some trouble on this right triangle program I have to write for class. I have it written out, and it compiled/runs just fine. The problem is that it says everything is a...
Thanks! :) I'll remember that.