can you help me? about array..please help me asap

java India
  • 12 years ago

    how will i do this one?? 

    every number  1 message box except the no.4 the message box in no. 4 must be like in my example

    1.accept student information
        *students name
        *course
    2.ask user how many subjects enrolled
    3.input subjects & corresponding grades
    4.check if     grades >=75---passed
                grades<75----failed
    if nos. of pass>failed---congratulations!!
    if nos. of pass<failed---sorry strive more!!!!
    if nos. of pass>failed---congratulations!!
    if nos. of pass==failed---keep moving!!

     

    the output must be this one

    example:

     xaimei fernando

    BSCS

    prog1 78 passed

    coarc 80 passed

     english 74 failed

     

    in no. 3 it depends on how many subjs. the user was inputed in no.2

    in no. 4 the program will check if you're grade was passed or failed 

  • 12 years ago
    What have you done so far? Here is the incomplete code, [CODE]

    public void AnAssignment(){ System.out.print("Enter your name: "); String name = scan.nextLine(); System.out.print("Enter course: "); String course = scan.nextLine(); System.out.print("Enter # of subjects: "); int num = scan.nextInt(); System.out.println("\n\n"); int x = 0; while(x= 75) System.out.print("Passed "); else System.out.print("Failed "); System.out.print("\n\n"); x++; } }[CODE]

    You can manipulate it. hope it helps, sukatoa

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programs must be written for people to read, and only incidentally for machines to execute.”