Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1. Download from Drive. Copy the contents of the file to your Cloud Editor. 2. Print out the following for the whole number the

image text in transcribed

image text in transcribed

Exercise 1. Download from Drive. Copy the contents of the file to your Cloud Editor. 2. Print out the following for the whole number the user entered: - The result of dividing that number by 3.0 - The remainder when you divide that number by 3 - The number's square root (hint: search the Math reference above for sqrt) - Optional: The result of that number raised to the fourth power (hint: search the Math reference above for pow) 3. Print out the following for the user's full name: - The character at index 0 (see week 2 slides) - The first 3 letters of the users name (hint: substring()) - The length() of the user's name (length is \# of characters including spaces) - Optional: The user's name in ALL CAPS importjava.util.;importjava.lang.Math;publicclassLab2{publicstaticvoidmain(String[]args){Scannerkbd=newScanner(System.in);System.out.print("Pleaseenterawholenumber:");intx=kbd.nextint();kbd.nextiine();//thisisnecessaryforgettingStringinputafteranint(dontworryaboutwhy)System.out.print("Pleaseenteryourfullname:");Stringname=kbd.nextine();//Beneaththiscomment,addyourcodetoprintthevaluesfromTheLab2documentout.}//EndLab2class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

=+1. What is the schedule for this project?

Answered: 1 week ago