1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nalin [4]
3 years ago
12

One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input

, and outputs the number of laps. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: System.out.printf("%.2f", yourValue); Ex If the input is: 1.5 the output is: 6.00 Exc If the input is: 2.2 the output is: 8.80 Your program must define and call a method: public statie double milestoLaps (double userkiles) LAB ACTIVITY 6.23.1 LAB Miles to track laps 0/10 LabProgram java Lood default template1 import java.util.Scanner; 2 3 public class LabProgram 4 5 public static double wiles Tolaps(double userMiles) 6 return userMiles / 0.25; 7 89 10 Scanner in new Scanner (System.in); 11 System.out.printf(x 27, wilestoLaps(in.nextDouble()); 12 }13 14 }15
Computers and Technology
1 answer:
postnew [5]3 years ago
4 0

Answer:

import java.util.Scanner;

public class LapToMiles {

   public static void main(String[] args) {

       System.out.println("Enter Number of Miles");

       Scanner in = new Scanner(System.in);

       double numMiles = in.nextDouble();

       double numberOfLaps = milestoLaps(numMiles);

       System.out.printf("%.2f",numberOfLaps);

   }

   public static double milestoLaps(double numMiles){

       //One lap = 0.25 miles

       double numberOfLaps = numMiles/0.25;

       return numberOfLaps;

   }

}

Explanation:

Create a Method milestoLaps that converts number of laps to number of miles

Within the main method call milestoLaps and pass your entered value for miles

format the output with printf()

You might be interested in
Which menu would most likely allow you to choose a font A.file B.Edit C.format D.insert​
Ksivusya [100]

Answer:

D

Explanation:

7 0
3 years ago
Determine if x(t) is periodic and determine the fundamental period.
Studentka2010 [4]

Answer:

hdiihgguilmjj jduhuiuedoibb

6 0
3 years ago
In general, the pilot and _______ approaches are the most favored conversion approaches.
Karo-lina-s [1.5K]

Answer:

The correct approach is "Phased".

Explanation:

  • The pilot step requires just to validate the development's implementation goals and objectives and then when the SDMX objects were introduced to development, several perhaps all problems have indeed been detected as well as logged through so that they're being corrected either by the detailed technical advisory committee.
  • The staggered or phased approach towards deployment provides the time possible to obtain the very next knowledge on evaluation criteria, staff including diverse cultures such that the strategy produced could be customized accordingly.
6 0
3 years ago
In a folder hierarchy, the top level is referred to as which of the following?
Vesnalui [34]

Answer:

B. root

Explanation:

Every user in Linux is assigned a folder from which they can store their files. The interpreter allows you to abbreviate your route with the “~” symbol. The ls command without any additional data shows the files in the current directory, but if after the name of the command a path is written, it shows the files in that path. Therefore, the ls ~ command shows the files in the user's folder.

In addition to the folders and files created by the user or programs, every Linux folder has two subfolders defined by default:

“..”: It is the top level folder in the file hierarchy that contains it. This subfolder is also present in the root of the filesystem (the folder with absolute path “/”), but points to itself.

“.”: It is the folder itself that appears as if it were also a subfolder. It can be considered as a "self-reference" or pointer to itself.

These folders are normal folders in the system for all purposes; that is, they can be used on routes. For example, the path /dirA/dirB/dirC/../fichero2.txt refers to the file that is stored in the dirB folder, since from dirC, the folder .. points to its predecessor, dirB. The following figure shows the interpretation of this route as well as the equivalent of the “..” and “.” Folders.

4 0
3 years ago
If you are an expert in your field, the purpose of your presentation will remain the same for all types of presentations. True o
Tomtit [17]
It's false because u can't keep yourself on one side all the time u have to change the type u r talking about
4 0
3 years ago
Read 2 more answers
Other questions:
  • John would like to move from the suburbs into the city, but the rent in the city is very high. John has found an apartment he re
    13·1 answer
  • What does it mean to say that two variables are negatively correlated?
    6·1 answer
  • Internet is for everyone but it wont be if its users cannot protect their privacy and the confidentiality of transactions conduc
    6·1 answer
  • Write an algorithm that gets as input your current credit card balance, the total dollar amount of new purchases, and the total
    8·1 answer
  • How can you tell the value of a purchase?
    7·1 answer
  • Which technology concept uses computer resources from multiple locations to solve a common problem?
    13·1 answer
  • Will mark Brainliest, need help ASAP!
    12·1 answer
  • Jjhb ft fv tuning Denise l Debbie
    9·1 answer
  • You're making great progress on your assignment. You've defined the purpose of your message, identified both the primary and sec
    9·1 answer
  • Authenticating information can be something a user knows, like a password; something a user has, like a smart card; or something
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!