Results 1 to 2 of 2

Thread: lost

  1. #1
    Mystic Beauty Annalysa's Avatar
    Join Date
    Sep 2001
    Location
    West Seattle Baby!
    Posts
    3,573

    lost

    public static void main (String args[])
    {

    int passes =0,
    failures =0,
    student= 1,
    result;
    String input,
    output;
    while ( student <= 10 ){
    input =JOptionPane.showInputDialog (
    "enter result ( 1 =pass,2 =fail)");
    result = Integer.parseInt ( input );
    if ( result ==1)
    passes = passes +1;
    else
    failures = failures +1;
    student = student +1 ;
    }
    output = "Passed:" + passes +
    "\nfailed:" =+ failures;
    if (passes >8)
    output = output +"\nRaise Tution";
    JOptionPane.showMessageDialog (null, output,
    "Analysis of exmaination Results",
    JOptionPane. INFORMATION_MESSAGE);
    System.exit ( 0);
    }
    }C:\Documents and Settings\lorri\Desktop\java\Analysis.java:22: unexpected type
    required: variable
    found : value
    output = "Passes:" + passes +
    I am awesome.

  2. #2
    The Folding General General_Jack_As's Avatar
    Join Date
    May 2002
    Location
    Phoenix, AZ
    Posts
    885
    What are you lost about?
    God Bless America

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •