Search:

Type: Posts; User: ixjaybeexi

Search: Search took 0.39 seconds.

  1. Replies
    5
    Views
    810

    Re: Need help making program

    Ok, I got a bit of it done, it's just that when there's a negative number in the list, it prints out the mean is NaN. An suggestions on how to fix my code to constitute for negative numbers?
  2. Replies
    5
    Views
    810

    Re: Need help making program

    Alrighty, hopefully now my logic will be correct and I'll be finished. Woo! Just one thing...when I go to compile, it says i declared "n" as a double, but an int is required. I didn't declare...
  3. Replies
    5
    Views
    810

    Re: Need help making program

    Hmm, so how should i declare the array in the main?
  4. Replies
    5
    Views
    810

    Need help making program

    Hey guys I have to create a program that computes the mean, standard deviation, and finds the max and min of a group of numbers read in from a file. I'm having trouble storing the objects from the...
  5. Replies
    3
    Views
    4,181

    Re: Converting temperature program

    Huh? :confused: Do you mean instead of nextInt make it nextDouble? What do I put inside the parenthesis then?
  6. Replies
    3
    Views
    4,181

    Converting temperature program

    Alright so I'm having trouble creating this program, basically I need to prompt the user to enter a 1 or 2 if 1, you run a convert from Fahrenheit to celsius, or if the user presses 2, the program...
  7. Replies
    14
    Views
    4,038

    Re: help!! quadratic program

    Hmm, I have the same problem. Here's my code:


    import java.util.Scanner;

    public class Assignment2
    {
    public static void main (String[] args)
    {
    Scanner in = new...
  8. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    Ok, so here's my code:


    public static int attendence (int lecturesAttended){
    if lecturesAttended <= 5 {
    int points = 2 * lecturesAttended;
    }
    else {
    points = 5 + lecturesAttended;
    }
  9. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    OH, wow alright I think I get it now, haha, that was a lot simpler than I thought, and then I just return points back into my main..
  10. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    :confused: Ya lost me, I'm kinda confused now.
  11. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    Alright so basically, it should be

    -if lectures <= 5, points = lectures * 2 + 5
    -else lectures > 5, points = lectures * 1

    Is it possible to do like points = points + points? That just...
  12. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    Hmm, alright.
    Could I use this algorithm?

    1) In terms of n, for each lecture attended, student gets 2 points for the first 5 and 1 for there after
    -If lecturesAttended > 5, points =...
  13. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    that's why i'm asking you guys hahaha, i don't know how to answer the question. i could use if/else if you could teach me how to do it...?
  14. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    I have no idea what your pseudo code means...we didn't learn how to do if and else statements yet
  15. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    Well what I have so far is this


    public class Lab6 {
    public static void main (String[] args){
    System.out.println("The amount of points received are " + attendence(7));
    ...
  16. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    can anyone help me?
  17. Replies
    25
    Views
    1,760

    Re: Need help creating this program

    we don't have to have the user input the amount of lectures attended, we just have to make up a number, and in my case it's 7. i know he's supposed to get 12 points, i just don't know the math...
  18. Replies
    25
    Views
    1,760

    Need help creating this program

    K, so I have to convert this problem into a method:

    5) Write a method named attendance that accepts a number of lectures attended by a student, and returns how many points a student receives for...
  19. Replies
    23
    Views
    1,694

    Re: Program with for loops help

    I'm only on my second chapter in Computer Science class, so I really don't know a whole lot
  20. Replies
    23
    Views
    1,694

    Re: Program with for loops help

    woo hoo thanks guys, i still have no idea what the hell i'm doing, but at least i got the answer to my challenge problem!
  21. Replies
    23
    Views
    1,694

    Program with for loops help

    Hey guys, I'm new to Java, and we're learning the For Loop in class, I don't understand it at all, and I need to create this object using for loops and nested for loops:

    ___*___
    __***__
    _*****_...
Results 1 to 21 of 21