1024programmer Blog Java language programming basics programming questions answers_Java language programming and data structures eleventh edition (basics) chapter 2 programming practice answers…

Java language programming basics programming questions answers_Java language programming and data structures eleventh edition (basics) chapter 2 programming practice answers…

package xz0410sss;

import java.util.Scanner;

public class xx {

public static void main(String[] args) {

//Java language programming and data structure The first topic of Chapter 2

// Scanner console = new Scanner(System.in);

// System.out.println(“Enter the Celsius column as 37 degrees”);

// double ss = console.nextDouble();//Celsius temperature

// double cc = (9.0/5)*ss+32; //Fahrenheit temperature

// System.out.println(ss+”Celsius”+cc+”Fahrenheit”);

//Java language programming and data structure The second topic of Chapter 2

// Scanner console = new Scanner (System.in); //Console input syntax

// System.out.println(“Enter radius:”);

// double c = console.nextDouble();//radius

// System.out.println(“Enter length:”);

// double s = console.nextDouble();//length

// System.out.println(“Area:”+(c*c)*3.1415926);

// System.out.println(“Volume: “+((c*c)*3.1415926)*s);

//Java language programming and data structure The third topic of Chapter 2

// Scanner console = new Scanner(System.in);

// System.out.println(“Enter the value of feet:”);

// double s = console.nextDouble();

// System.out.println(s+”ft”+(s*0.305)+”m”);

//Java language programming and data structure The fourth topic of Chapter 2

// Scanner console = new Scanner(System.in);

// System.out.println(“Enter a number in points: “);

// double c = console.nextDouble();

// System.out.println(c+”pound”+(c*0.454)+”kg”);

//Java language programming and data structure The fifth topic of Chapter 2

// Scanner console = new Scanner (System.in);

// System.out.println(“Enter subtotal and tip rate:”);

// double c = console.nextDouble();

// double s = console.nextDouble();

// System.out.println(“Tip: “+(c*0.15)+”Total cost: “+(c+(c*0.15)));

//Java language programming and data structure The sixth topic of Chapter 2

// Scanner console = new Scanner (System.in);

// System.out.println(“Enter a number: “);

// int c = console.nextInt();

// int cc = c % 10;

// int ccx = c / 10 % 10 ;

// int ccxx = ccx % 10;

// int sum = (cc+ccx+ccxx);

// System.out.println(“Number sum: “+sum);

//Java language programming and data structure The seventh topic of Chapter 2

// Scanner console = new Scanner (System.in);

// System.out.println(“Enter minutes:”);

// int s = console. nextInt();

// System.out.println(s+”minutes are about”+(((s/60)/24)/365)+”years”+((((s/60)/24/365)) %365)+”day”);

//Java language programming and data structure The eighth topic of Chapter 2

//No

//Java language programming and data structure The ninth topic of Chapter 2

// Scanner console = new Scanner (System.in);

// System.out.println(“v0:”);

// double c = console.nextDouble();

// System.out.println(“v1:”);

// double cc = console.nextDouble();

// System.out.println(“t:”);

// double xx = console.nextDouble();

// System.out.println(“Average acceleration: “+((cc-c)/xx));

//Java language programming and data structure The tenth topic of Chapter 2

// Scanner console = new Scanner (System.in);

// System.out.println(“Enter the amount of water (in kilograms):”);

// double c = console.nextDouble();

// System.out.println(“Enter initial temperature: “);

// double x = console. nextDouble();

// System.out.println(“Enter final temperature:”);

// double v = console.nextDouble();

// System.out.println(“The required energy is: “+c*(v-x)*4184);

//Java language programming and data structure The eleventh topic of Chapter 2

// &nbspFormula: ta = 35.74 +0.6215ta-35.75v0.16 + 0.4275tav0.16

// System.out.println(35.74+0.6215*c-35.75*Math.pow(fs, 0.16)+0.4275*c*Math.pow(fs, 0.16));

// Java language programming and data structure Chapter 2 Chapter 18

// System.out.println(“a b pow(a, b)”);

// System.out.println(“1 2 ” + (int)Math.pow(1, 2));

// System.out.println(“2 3 ” + (int)Math.pow(2, 3));

// System.out.println(“3 4 ” + (int)Math.pow(3, 4));

// System.out.println(“4 5 ” + (int)Math.pow(4, 5));

// System.out.println(“5 6 ” + (int)Math.pow(5, 6));

//

// //Java language programming and data structure Chapter 2, topic 19

// Scanner in = new Scanner (System.in);

// System.out.println(“Input the three points of the triangle (x1,y1)(x2,y2)(x3,y3):”);

// double x1 = in.nextDouble();

// double y1 = in.nextDouble();

// double x2 = in.nextDouble();

// double y2 = in.nextDouble();

// double x3 = in.nextDouble();

// double y3 = in.nextDouble();

// double s = (x1+x2+x3)/2;

// double mj = s*(s-y1)*(s-y2)*(s-y3);

// System.out.println(“Area is: “+mj);

//Java language programming and data structure Chapter 2 Topic 20

// Scanner in = new Scanner(System.in);

// System.out.println(“Enter balance and interest:”);

// int ye = in.nextInt();

// double lx = in.nextDouble();

// System.out.println(“Next month’s interest: “+ye*(lx/1200));

//Java language programming and data structure The twenty-first topic of Chapter 2

// Scanner in = new Scanner(System.in);

// System.out.println(“Start investing:”);

// double tz = in.nextDouble();

// System.out.println(“Enter the annual interest rate by percentage: “);

// double nll = in.nextDouble()/100; //% 3.25 to remove the percentage

// System.out.println(“Enter the year: “);

// int nf = in.nextInt()*12; // the number of years is 12

// double c = 1+nll;

// System.out.println(“Future value: “+tz*c);

//Java language programming and data structure The twenty-third topic of Chapter 2

// Scanner in = new Scanner(System.in);

// System.out.println(“Enter the distance traveled: “);

// double jl = in.nextDouble();

// System.out.println(“Enter miles per gallon: “);

// double mjl = in.nextDouble();

// System.out.println(“Enter the price per gallon: “);

// double jg = in.nextDouble();

// System.out.println(“The cost of driving is: “+jl/mjl*jg);

}

}

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索