Search:

Type: Posts; User: Oldemor

Search: Search took 0.17 seconds.

  1. Replies
    13
    Views
    402

    Re: min and max value of int

    Ill try it when i come home, thanks for the advice
  2. Replies
    13
    Views
    402

    Re: min and max value of int

    Yeah, im sorry, im having a hard time saying what i really mean, when my native language isnt english :) I got a little guidance from my mentor, and i had just missunderstood the task i'd gotten....
  3. Replies
    13
    Views
    402

    Re: min and max value of int

    2147483647! But ive fixed that, now i need to fix or remake the program so it do exactly the same without returning a 0 or a random value that should be shown with a println in the main
  4. Replies
    13
    Views
    402

    Re: min and max value of int

    My code now looks like this:


    import java.util.Scanner;


    public class OppgaveC {

    static double maksTemp = 0;
    static double minTemp = 0;
  5. Replies
    13
    Views
    402

    Re: min and max value of int

    It seems to be working like it should, without doing the modifications youre suggesting.. hmm.

    --- Update ---

    edit: reason i said it wasnt working in the start was because i had some random...
  6. Replies
    13
    Views
    402

    Re: min and max value of int

    :eek: You're right, wanna help me on this one?
  7. Replies
    13
    Views
    402

    Re: min and max value of int

    Wow, it worked by just changing their value to 0 instead of the integer.max_value and min_value.. Thank you (~~)(~~)
  8. Replies
    13
    Views
    402

    min and max value of int

    Hey, im trying to make a program where you can type in alot of values, and then it should return the sum of them, how many values ive typed in and the highest/lowest value. My code currently looks...
  9. Replies
    7
    Views
    181

    Re: Help with a for loop and formating

    Ah :) Thank you for your expertise. I moved the test, and it worked like i was hoping it to do. Its okay that it doesn't print the whole line, as of now! Have a great day.
  10. Replies
    7
    Views
    181

    Re: Help with a for loop and formating

    My current issues:
    If i put the parameter to 56, it prints out numbers up to 55. But if i put the parameter to 57, it prints out numbers up to 66??
    Heres the current code:


    private static void...
  11. Replies
    7
    Views
    181

    Re: Help with a for loop and formating

    Got some problems now, if i put 45 as a parameter, it prints out correctly like this: 2398, but if i put it to for example 95, it turns out like this: 2399 Somehow it doesnt stop on 95 if i put the...
  12. Replies
    7
    Views
    181

    Re: Help with a for loop and formating

    Ive come up with something, its almost done:
    private static void printNumbersB(int n) {


    int teller = 1;

    for (int lineNumber = 1; lineNumber <= n; lineNumber++) {
    for...
  13. Replies
    7
    Views
    181

    Help with a for loop and formating

    Hey! Im going to make a program that prints out this to the console: 2395

    Anyone got any thoughts on how to do it? I think it has something to do with a for loop and some formatting of the...
  14. Help to solve this for loop more effectively :)

    deleted
  15. Thread: Hey!

    by Oldemor
    Replies
    1
    Views
    168

    Hey!

    Hey im new to java and im trying to learn as much as i can :)
Results 1 to 15 of 15