0% found this document useful (0 votes)
9 views5 pages

Java WH

The document contains multiple Java programs that perform various arithmetic operations such as temperature conversion from Celsius to Fahrenheit, calculating the area of a circle, triangle, and square, as well as basic arithmetic operations like multiplication, division, and modulus. Each program uses the Scanner class to take user input and outputs the calculated results. The code demonstrates fundamental programming concepts in Java, including variables, data types, and control flow.

Uploaded by

kowsikur2012
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views5 pages

Java WH

The document contains multiple Java programs that perform various arithmetic operations such as temperature conversion from Celsius to Fahrenheit, calculating the area of a circle, triangle, and square, as well as basic arithmetic operations like multiplication, division, and modulus. Each program uses the Scanner class to take user input and outputs the calculated results. The code demonstrates fundamental programming concepts in Java, including variables, data types, and control flow.

Uploaded by

kowsikur2012
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

JAVA PROGRAM WH#

// JAVA Tampareture

package [Link];

import [Link];

public class tampareture {

public static void main(String[] args) {

Scanner input = new Scanner([Link]);

double celsius,tem;

[Link]("enter celsius: ");

celsius = [Link]();

tem = 1.8 * celsius+32;

[Link]("fahrenheite is: "+tem);

// JAVA circle

package [Link];

import [Link];

public class circle {

public static void main(String[] args) {

Scanner input = new Scanner([Link]);

double radius, circleArea;

[Link]("enter radius:");

radius = [Link]();

circleArea = 3.1416 * radius * radius;

[Link]("radius of cercle: "+circleArea);

}
JAVA PROGRAM WH#

//JAVA Triangledamo

package [Link];

import [Link];

public class Triangledamo {

public static void main(String[] args) {

Scanner input = new Scanner([Link]);

double base,height,triangleArea;

[Link]("type base: ");

base = [Link]();

[Link]("type height: ");

height = [Link]();

triangleArea = 0.5 * base * height;

[Link]("your area is: "+triangleArea);

//JAVA Tampareture

package [Link];

import [Link];

public class tampareture {

public static void main(String[] args) {

Scanner input = new Scanner([Link]);

double celsius,tem;

[Link]("enter celsius: ");

celsius = [Link]();
JAVA PROGRAM WH#

tem = 1.8 * celsius+32;

[Link]("fahrenheite is: "+tem);

//JAVA Squer

package [Link];

import [Link];

public class Squer {

public static void main(String[] args) {

Scanner input = new Scanner([Link]);

double square, squareResult;

[Link]("enter square size:");

square = [Link]();

squareResult = square*square;

[Link]("size of square: "+squareResult);

//JAVA Arithmeticoperator

package [Link];

import [Link];

public class Arithmeticoperator {

public static void main(String[] args) {

Scanner input= new Scanner ([Link]);

int digit1, digit2, res;


JAVA PROGRAM WH#

[Link]("press your first digit:");

digit1 = [Link]();

[Link]("press your secend digit:");

digit2 = [Link]();

res = digit1 * digit2;

[Link]("mul is:"+res);

double result2 = (double) digit1 / digit2;

[Link]("div is:"+result2);

res = digit1 % digit2;

[Link]("remind is:"+res);

//JAVA faranhite

package [Link];

import [Link];

public class faranhite {

public static void main(String[] args) {

Scanner input = new Scanner([Link]);

double fahrenheit,fahrenheitTemp;

[Link]("enter celsius: ");

fahrenheit = [Link]();

fahrenheitTemp = 0.55* (fahrenheit-32);

[Link]("fahrenheite is: "+fahrenheitTemp);

}
JAVA PROGRAM WH#

You might also like