Steam recently changed the default privacy settings for all users. This may impact tracking. Ensure your profile has the correct settings by following the guide on our forums.
Yeah, just grab gcc and compile the file to a binary... because you probably already know what those things are.
An easy way to learn programming is with an IDE such as DevC++/Visual Studio/Code::Blocks. An IDE will simplify the entire process of creating an application and getting it up...
Could you provide a little bit of info on why the issue you had happened and how you solved it? Doing that could be helpful for anyone that may run into the same problem.
Well, since you are new to Java, I'll give you a tip to help you and so that you won't get attacked when asking for help about your code.
FORMAT YOUR CODE. ;)
It makes it readable for you and for anyone else that has to read your code. Code looks cleaner when indented properly and blocks...
return 0 is the only exit that your function has, so it will never return anything aside from zero at this point. You need to add some logic that returns the value you want.
In addition to that, you are doubling the value of 'a' every function call, so you aren't getting a * b, but a*(2^b)...
highest = abs(max(items))
if highest != 0:
longest = int(log(highest)+1) # the length of the longest number
How about if it's fed a list like this?
[-3; 8;4;-4; -1202324324; -10; 0; 2; 6;-2343;-79436; 1]
abs(max(items)) will return 8
int(log(8) + 1) will return 1
k will go up...
Now that your program accepts negatives, does it sort them properly?
I know what you were asking ;)
I couldn't help myself. I've never written a radix sort before I felt that that needed to change.
let radixSort (list:int array) : int array =
let largestInt = Array.maxBy abs list
let...
System.out.println(logan.nextLine));
You are missing a parenthesis. Add a ( to make your code look like this:
System.out.println(logan.nextLine());
There is no need to recode your program as nick48 has done.
Understanding basics is an important part of learning a language, but you need more that "getting some basics of it" to be able to use C.
In addition to that, you need to know how to read compiler errors. In this case, your compiler actually told you what the "little stuff" that you let...
As EvilSeph stated already, the way that you check for the value of 'bet' isn't correct. You are checking the value of bet three times when you want to check it only once. Although your code works in this case, there are times when the conditions after the first true statement may also be true...
Here's a solution to find the distance in F# I wrote yesterday (From what I understood, this is what you asked for). It's not as elegant or fast as it could be, but it does the job. Have fun deciphering it, perl man.
type Person(name:string) = class
let _Name = name
let mutable _Friends =...