thanks, also i do check the code but sometimes i have noticed that you can get the code to work but it might not be the proper way to write it. so what i am trying to do is make sure that i am...
Type: Posts; User: newbie101
thanks, also i do check the code but sometimes i have noticed that you can get the code to work but it might not be the proper way to write it. so what i am trying to do is make sure that i am...
i am trying to write a loop that counts how many times the number 3 appears in a one-dimensional array called array.
int count = 0;
for (int x = 0; x < Array.length; x++)
if (Array[x]...
thank you the c was just a typo it should have been x
i am trying to come up with function prototypes for 2 functions. here is what i have:
1. a function Symbol() that takes a character value x and returns a
Boolean value.
2. a function...
thanks got it
thanks now i understand
i can see why the 1st one is run once but why the second 5 times and not 4? if i have 1 and want to get to -3 i would just run it 4 time wouldnt i?
here is what i have:
char Let = 'J';
int Bo = -3;
for (char Ind=Let; Ind<= 'J'; ++Ind) <statement>;
i actually have 2 more:
char Let = 'J';
int Bo = -3;
for (char Ind=Let; Ind<= 'J'; ++Ind) <statement>;
thank you now i get it. thanks again guys
so in the 1st one the <statement> would be run 7 times and in the 2nd one it would only be run once because of the ;?
i have a question i dont understand the difference in the syntax for the loop statement. here is what i have:
int num = 7;
int coun;
for (coun=1; coun <=num; ++coun) <statement>;
thanks got it, i was close but i didnt have the right syntax for the for loop. thanks again
thanks i almost had it right before you replied. i gave total the value of 0 and i put in total++ but i forgot the ; after the total++. thanks for the help.
now if i wanted to make this a for...
ok and how do i do that? i will continue to input stuff in the code to try and figure it out.
i tried inputting this in the code but i keep getting errors. i declared total as an int but it still doesnt compute
i am trying to write a while loop that computes the total of the odd numbers between 1 and 99 inclusive. i wrote this but it just lists the numbers doesnt compute them. can somebody help?
...