Question about Sun Java Programming Language (cdj-275)

2 Answers

Triangle output in java programming

Triangle output in java

Posted by on

Ad

2 Answers

  • Level 1:

    An expert who has achieved level 1.

    Mayor:

    An expert whose answer got voted for 2 times.

  • Contributor
  • 1 Answer

5
45
345
2345
12345

Posted on Oct 04, 2010

Ad
  • Level 1:

    An expert who has achieved level 1.

    MVP:

    An expert that got 5 achievements.

    Governor:

    An expert whose answer got voted for 20 times.

    Hot-Shot:

    An expert who has answered 20 questions.

  • Contributor
  • 30 Answers

Import java.util.Scanner; public class triangle { public static void main(String[] args) { double sidea; double sideb; double sidec; Scanner in = new Scanner(System.in); System.out.println("Enter the first side of a triangle: "); sidea = in.nextDouble(); System.out.println("Enter the second side of a triangle: "); sideb = in.nextDouble(); System.out.println("Enter the third side of a triangle: "); sidec = in.nextDouble(); System.out.println("Sides" + " " + sidea + " " + sideb + " " + sidec); if (((sidea * sidea) + (sideb * sideb)) == (sidec * sidec)) System.out.println("right triangle"); if (((sidea * sidea) + (sidec * sidec)) == (sideb * sideb)) System.out.println("right triangle"); if (((sidec * sidec) + (sideb * sideb)) == (sidea * sidea)) System.out.println("right triangle"); //right triangle if ((sidea == sideb) && (sidea == sidec) && (sideb == sidec)) System.out.println("equilateral triangle"); //equilateral triangle if (((sidea == sideb) || (sideb == sidec) || (sidea == sidec)) && !((sidea == sideb) && (sidea == sidec) && (sideb == sidec))) System.out.println("isosceles triangle"); else (!((sidea == sideb) && (sidea == sidec) && (sideb == sidec))) System.out.println("scalene triangle"); //scalene if (((sidea + sideb) >= (sidec)) ||((sidea + sideb) >= (sideb)) ||((sideb +sidec) >= (sidea))) System.out.println("not a triangle"); } }

Posted on Jul 23, 2010

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Tm u220 java


Are you printing from inside a java program (output) or from a java program editor.
Use the command to Open an output file, have all your output sent to the output file, close the output file properly before you exit the java program. After you finish send the output file to the matrix printer as you would with ASCII file. If the printer is installed properly, your OS should know where to send the output.

Dec 23, 2013 | Epson TM-U220 Matrix Printer

2 Answers

Compute the area of triangle


Hi nanaeden

Use the formula depending on what is given
If one side and vertical height from that side to the opposite vertex is given, use the formula 1/2 of basexheight
If 3 sides of the triangle are given use the formula
sq root of [ s(s-a)(s-b)(s-c)] where a,b, c are the 3 sides and s is semi- perimeter.
Familiarise with formulae to solve Maths problems.
If it is helpful, please give a rating.
Have a nice day
luciana44

Nov 25, 2009 | Cell Phones

4 Answers

Can anyone tell how run java program in cmd prompt???


Hi,

You need to type:

If it's a program.class

java program

or of it's a program.jar

java -jar program.jar

regards

Apr 03, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

Certain pictures and vidoes dont open or play


Hello fgskas,

This is due to not having the correct plugin on the computer to view these pictures and videos. You may want to try downloading flash and java updates. You can get flash from www.adobe.com and you can get java from www.java.com.

Mar 30, 2009 | Dell Dimension 4700 PC Desktop

1 Answer

Before downloading Yahoo Messenger 9.0, I could view videos on the Internet but now where the video used to be, there is just a big white box and a small box in the upper left corner with red & blue...


You are missing either a video codec or possibly need to update Flash and/or Java.

www.adobe.com - to update flash player
www.java.com - to update Java

Mar 19, 2009 | Computers & Internet

1 Answer

Errors!


update java once shockwave player and flash windows update run ccleaner.com tool k

Oct 09, 2008 | Computers & Internet

1 Answer

Java programming: file access


(R.id.note) this is the error in java, How can I rectify it;

Aug 29, 2008 | Computers & Internet

1 Answer

When visiting a site such as Friends Reunited I cannot view the site as I keep getting a message up with a yellow exclamation mark in a triangle saying: Error in addLoadEvent:(object error). I have typed...


It appears to be a Java script error.
The chances are some pages your are visiting are using Java script to deliver multilayer messages or adverts.
If you didn't have Java script installed on your machine you would get an error along the lines of "page was unable to load" so I am guessing your Java script needs updating.
Go to this site: http://www.java.com/en/ you can either download Java or have the site check your computer to see if it has the latest copy(easiest method).

Aug 12, 2008 | Computers & Internet

3 Answers

Jawa void


you should not use arguments in void function in java ... in java pertaining to void the compiler doesn't understand the arguments and treats that as invalid... in c it is ok

Aug 07, 2008 | Sun Java Studio Standard 5 (SSJI9501TL9M)...

1 Answer

Java


UNINSTALL your old version of Java, then Install the updated version, - this works, in that order....

Dec 26, 2007 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

614 people viewed this question

Ask a Question

Usually answered in minutes!

Top Sun Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18394 Answers

Cosma Papouis
Cosma Papouis

Level 3 Expert

409 Answers

Robin Hill
Robin Hill

Level 3 Expert

1263 Answers

Are you a Sun Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...