Yes you're correct, wrote that segment very quickly
Type: Posts; User: UCFuser
Yes you're correct, wrote that segment very quickly
First thing you'll want is to read in a score from the user...what part of your program is giving you problems?
#include <stdio.h>
#include <stdlib.h>
I was able to fix the problem by uninstalling code::blocks and then installing the "mingw-setup.exe" version of the binary setup file. Thanks for the advice from everyone though!
Ok I looked at the file that does compile, but now it will run when I press the play button, but pressing the build and run button doesn't do anything? Maybe because it's already built? And the...
Operating system: Win 7 Home premium SP1
I only tried it with the intel one because I tried to put it in a project before using the GNU GCC compiler but got the same error message I am getting now...
I created a project and put the source file into it, but now when I try to build and run it I get an error in the build log that says " 'Program2 - Debug' uses an invalid compiler. Probably the...
I went to File->New->File
This launched a window asking for file type, I selected C/C++ source file, which launched the C/C++ source file wizard, the wizard basically just asks if it's a C or C++...
This may be a trivial error that I'm not recognizing (just recently started using code blocks) but I can't seem to figure out why this C source file wont compile. I have other files which compile and...
After drawing numerous pictures and looking over some of those explanations I think I understand much better now and the program works fine, heres my final function
int subtractEveryOther(struct...
I defenitly will upgrade compilers I've just been using the one recommended to me, but I've done some revising and now my program looks like this (i left out the initilization of the list but it is...
Hm I am using Dev C++ so maybe thats why you are getting additional errors, the only ones I get are related to
temp = first->data and I am basically trying to use temp as a way to travers the...
I'm trying to write a basic little practice program to help me understand linked lists a little more (they give me trouble) and I'm trying to basically set it up to subtract every other node starting...
Ahh I see what you mean, thanks!
This is the whole function
double itemshipping(double price, double weight, int quantity, int tax) {
//declare some intitail variables.
double shippingweight,...
What do you mean? I use that same variable total in another if statement right after this one.
if (tax == 1) {
price += shippingcost;
total = price - (price *...
if (tax == 1) {
price += shippingcost;
total = price - (price * TAX_RATE);
return total;
}
I dont know why but its giving me the message "syntax...
Haha well I guess that was pretty simple thanks
This is really the only segment of code that matters
for (i=0; i<length; i++) {
for (c=0; c<length; c++) {
product[i] = a[i]*a[c];
}
}
Ok i have gotten farther but I'm still not getting it all, here is what I have now
int contestants, audience, judges, i, score, row, col, average, total;
FILE *ifp;
ifp...
Im trying to read values from a .txt file, the first line of which tells you how many other lines there are and how many values are in each line, for example if the first line reads
4 5 1
That...
Thanks that did it
I have the equation
minht = (sqrt((sqrt(h/4.9)) * 9.8)) * 9;
and based on the users inputted values i have to calculate minht. For example if I had a Min of 10 and a Max of 20, i need a...
Nevermind, I just set all of the > signs to >=.
I changed all the if's after the first one into else if statements but its still not working, it just runs my last else statement. As for arrays that's what all my classes next week are about haha.
I have a whole list of if statements in my program, and I need to know how to make it so that if an if statement is true, then it stops all operations after that. How do I do this?
These are my...