Search:

Type: Posts; User: fartofagony

Search: Search took 0.48 seconds.

  1. Replies
    11
    Views
    470

    [SOLVED] Re: changing datatype failure

    thank you soooo much!! i changed total2 to a double instead of an int and now the cast works correctly! nd my exercise is finished now thanks to you

    heres the small change:



    public class...
  2. Replies
    11
    Views
    470

    [SOLVED] Re: changing datatype failure

    it will calculate the averege (if thats what its called in english) of the 3 intergers the user inputs
    when i make the program in c++ language it seems fine to cast and when i do it in java the way...
  3. Replies
    11
    Views
    470

    [SOLVED] Re: changing datatype failure

    im using eclipse
    oh i forgot to mention that the Keyboard class should be working correctly they instructed me to use it instead of Scanner to get user input

    nope not from the book just tried to...
  4. Replies
    11
    Views
    470

    [SOLVED] Re: changing datatype failure

    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    Type mismatch: cannot convert from double to int

    at Ex21.main(Ex21.java:8)
  5. Replies
    11
    Views
    470

    [SOLVED] Re: changing datatype failure

    i think so yeah im learning java too but his question seemed a little different:D
    do you know how to solve it?
  6. Replies
    11
    Views
    470

    [SOLVED] changing datatype failure

    public class Ex21{
    public static void main(String args[]){
    int num1, num2, num3, total1, total2;
    num1 = Keyboard.readInt();
    num2 = Keyboard.readInt();
    num3 = Keyboard.readInt();...
Results 1 to 6 of 6