Oh my god, I was tearing my hair out! Cheers for that!
This works perfect now:
int list::maxArray(int integerArray[], int sizeOfArray)
{
int max = integerArray[0];
for (int i=0;...
Type: Posts; User: En-Motion
Oh my god, I was tearing my hair out! Cheers for that!
This works perfect now:
int list::maxArray(int integerArray[], int sizeOfArray)
{
int max = integerArray[0];
for (int i=0;...
Cheers for your reply. I've edited my post and also incuded some other functions which now work. This is my max function now but it still doesn't work:
int list::maxArray(int integerArray[],...
Currently working on coding a class which takes in an arbitrary list of integers and performs various functions on the list.
Get max
Get min
Get average
Amount of numbers in list
Search...
Cheers mate. Works now. I'd like to be able to prompt user for input rather than using "Test String". I can't seem to figure it out though. Do you know where I could look that would point me in the...
Cheers for your help. I'vr changed my code and it's working much better now. I've also added a new overloaded print function where print(int k) will print 1st k digits of a string. When I run the...
OK, i'm having a few problems with my program below. I want to write a reverse function and call it in main [(this is in addition to other functions i have added to mystring class) but any code i've...
Definitely wrote my own code. I've been at it for a while now and it's driving me mad. I'm just looking for some help where i'm going wrong.
I've had a look at my code and i've changed billOff and...
I keep getting 116. I can't figure out how yours worked ok with the same code
Missed that. Thanks. But even when I do that I keep hetting 116.000 no matter what values I enter for peak and off peak??
I'm trying to write a program which prints a bill given certain input. I'm trying to add the two values for billPeak and billOff but whenever I run my program the last part gives a crazy number. All...
Cheers for that again lads. I see where i went wrong
Should have wrote != for 1st one,
(m>=1) && (m<=12) for 2nd one.
i'm hoping i'm right here for the last one
(a!=b) ||...
Cheers for the replies guys. I've had another go, hopefully you might be able to have a look at these too:
(x>0) && ((x%10)!==0)
(m>1) && (m<12)
(a==b) && (b==c)
(a==b) || (b==c) || (a==c)
I have to write logical expressons in C for the following..
x is a negative integer which is greater than -2000
x is a positive integer which is not divisble by 10
x is an even number greater...
i need to get a printout of a c program running using dos-redirection. Does anyone know how i can redirect the output to a textfile so i can print it?