Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

hba

  • 3 years ago

int b1, b2, h; float area; Console.WriteLine("please enter b1"); b1=int.Parse(Console.ReadLine()); Console.WriteLine("please enter b2"); b2=int.Parse(Console.ReadLine()); Console.WriteLine("please enter h"); h=int.Parse(Console.ReadLine()); area = (b1 + b2) * h / 2; Console.WriteLine(area); Console.ReadLine();

  • This Question is Closed
  1. hba
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    @ajprincess

  2. Voidus
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Is this in a method?

  3. KonradZuse
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Idk why you are using the Console, but I would use Java.Util.Scanner instead.... http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Scanner.html

  4. hba
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    i did it thanks anyways.

  5. KonradZuse
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    with scanner or console?

  6. hba
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    With console.

  7. hba
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    Its not Java,Its C#

  8. KonradZuse
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    oic :O.

  9. hba
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    See i changed it lol,I was just acting stupid :P

  10. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy