subject

Hey im in ap computer science a (taking it on edhesive) and i'm confused on how to print a variable (double) but make it show up as an integer and i dont know what i'm doing wrong. (i'm using drjava). (i'll give brainliest if it works) here is my code: /* * lesson 6 coding activity question 2 * * input a double value and print only the integer part. * * sample run: input a decimal number: 57.8934 57 */ import java. util. scanner; import java. lang. math; class lesson_6_activity_two { public static void main(string[] args) { system. out. println(" input a decimal number"); scanner scan = new scanner (system. in); double x = scan. nextdouble(); int b = scan. nextdouble(); system. out. println(b); } }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
Aprovides legal protection for something an individual has created
Answers: 1
question
Computers and Technology, 22.06.2019 11:30
To hide gridline when you display or print a worksheet
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
What is the term for water wave that is created by an underwater earthquake
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
You know the right answer?
Hey im in ap computer science a (taking it on edhesive) and i'm confused on how to print a variable...
Questions
question
Mathematics, 04.08.2021 01:50
question
Mathematics, 04.08.2021 01:50
question
Mathematics, 04.08.2021 01:50
question
Mathematics, 04.08.2021 01:50
Questions on the website: 13722359