Search:

Type: Posts; User: silverpen10

Page 1 of 2 1 2

Search: Search took 0.27 seconds.

  1. Replies
    6
    Views
    250

    Re: problem with compiling

    nvm my new compile error was just a typo. i got what you said but i still got an error all b/c of a typo. thanks
  2. Replies
    6
    Views
    250

    Re: problem with compiling

    no I'm not sure how to do that in this case
  3. Replies
    6
    Views
    250

    Re: problem with compiling

    Write a program that generates 100 random integers in the range 0 to 25, and stores them in an array. Then, the program should call a class method that sorts the odd numbers into an array and another...
  4. Replies
    6
    Views
    250

    problem with compiling

    public class Unit8
    {
    public static void main( String [] args )
    {

    int [] even = new int [ 100 ];
    int [] odd = new int [ 100 ];

    int randomNum;
  5. Replies
    22
    Views
    357

    Re: compile error

    i think cels method is pulling f as 0 not from the case 1
  6. Replies
    22
    Views
    357

    Re: compile error

    gottcha so i should do it in the other program

    --- Update ---

    if i put 55 in for fahrenheit i get 57.6 (it should be 12.7)


    public class prgmONE // Peter Krasinski
    {
    public static void...
  7. Replies
    22
    Views
    357

    Re: compile error

    nvm i did 5/9. your right i get 1.0
  8. Replies
    22
    Views
    357

    Re: compile error

    its 0 how do i change it
  9. Replies
    22
    Views
    357

    Re: compile error

    Its sill not returning the proper value


    public class prgmONE // Peter Krasinski
    {
    public static void main(String [] args)
    {
    double c = 0, f = 0;
    double c2 = cels(c, f);
    int which =...
  10. Replies
    22
    Views
    357

    Re: compile error

    new program


    public class prgmONE // Peter Krasinski
    {
    public static void main(String [] args)
    {
    int c = 0, f = 0;
    int c2 = cels(c, f);
    int which = Input.getInt("1 for Celsius, 2...
  11. Replies
    22
    Views
    357

    Re: compile error

    i got it to work
    new code


    public class prgmTWO
    {
    public static void main(String [] args)
    {
    double P = Input.getInt("How much have you deposited?");
    double i = Input.getInt("What is...
  12. Replies
    22
    Views
    357

    Re: compile error

    Last login: Mon Jan 7 11:11:36 on ttys000
    petes-MacBook-Air:~ pkrasinski$ cd java\ programs/
    petes-MacBook-Air:java programs pkrasinski$ javac prgmTWO.java
    prgmTWO.java:10: variable s might not...
  13. Replies
    22
    Views
    357

    Re: compile error

    heres the error1701
    sorry its small
  14. Replies
    22
    Views
    357

    Re: compile error

    input.class?
  15. Replies
    22
    Views
    357

    compile error

    i dont know whats wrong


    public class prgmTWO
    {
    public static void main(String [] args)
    {
    double P = Input.getInt("How much have you deposited?");
    double i = Input.getInt("What is...
  16. Replies
    8
    Views
    344

    Re: looping println

    nvm
  17. Replies
    19
    Views
    820

    Re: problem with odd/even

    true but i got a 100
  18. Replies
    19
    Views
    820

    Re: problem with odd/even

    public class Unit6_1 // Peter Krasinski
    {
    public static void main( String [] args )
    {
    int i = 0;
    int sumODD = 0, sumEVEN = 0;
    while ( ++i <= 25 )
    {
    if (i % 2...
  19. Replies
    19
    Views
    820

    Re: problem with odd/even

    every time it loops it displays the sum of the next even or odd number. the final is the sum of all numbers. i want to display that number alone
  20. Replies
    19
    Views
    820

    Re: problem with odd/even

    public class Unit6_1 // Peter Krasinski
    {
    public static void main( String [] args )
    {
    int i = 0;
    int sumODD = 0, sumEVEN = 0;
    while ( ++i <= 25 )
    {
    if (i % 2...
  21. Replies
    8
    Views
    344

    Re: looping println

    got it thanks
  22. Replies
    19
    Views
    820

    Re: problem with odd/even

    i never used counters before can you explain
  23. Replies
    8
    Views
    344

    Re: looping println

    public class Unit6_2 // Peter Krasinski
    {
    public static void main( String [] args )
    {
    int x = 0;

    System.out.println();

    while ( x <= 10 )
    {
  24. Replies
    19
    Views
    820

    Re: problem with odd/even

    Nvm i got the numbers now how would you add all values of odd or even
  25. Replies
    19
    Views
    820

    Re: problem with odd/even

    i got the evens by i % 2 == 0. but i can't get the odd even with if else
Results 1 to 25 of 42
Page 1 of 2 1 2