Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (hba):

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();

OpenStudy (hba):

@ajprincess

OpenStudy (anonymous):

Is this in a method?

OpenStudy (konradzuse):

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

OpenStudy (hba):

i did it thanks anyways.

OpenStudy (konradzuse):

with scanner or console?

OpenStudy (hba):

With console.

OpenStudy (hba):

Its not Java,Its C#

OpenStudy (konradzuse):

oic :O.

OpenStudy (hba):

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

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!