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, 22.06.2019 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
question
Computers and Technology, 22.06.2019 15:10
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
What is the definition of digital literacy?
Answers: 1
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, 02.08.2021 15:30
question
History, 02.08.2021 15:30