Question

Write a Java program which accepts distance in kilo meters as input and displays its Miles equivalent, or vice versa, as per the choice of user.

22 Aug 2022
Answer :
Word Count : 262

Here is a Java program that accepts distance in kilometers or miles as input and converts it to the other unit:

import java.util.Scanner;

public class DistanceConverter {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        System.out.print("Enter distance __________ ______ ____ _________ _________ ____.
_____ ________ _____ ____ ___ ______ ________ __________ ______ ______ ________.
_______ ______ ____ ______ __________ ___ ______ ____ _____ __________.
_____ ______ _______ __________ _____.
____ __________ _____ ________ ___ _____ ______.
_____ _______ ________ _______ ___ _____ _______ _______ __________ _____ _____ _________.
________ _____ ________ ______ ________ ______ _________ _______ __________ _________ ___ ____.
__________ ____ _______ ________ _________ _________ ____ ___.
_____ ______ ____ _______ _____ _______ _________ ________ __________ _______.
____ _________ _______ ______ ______ ________.
_________ _______ __________ _____ _______ _______ __________ ____.
____ _________ ________ ____ _________ _______ ______ ___.
______ _________ ______ _______ __________ _____ ______ _________.
______ ________ ______ ______ ____ __________ _____.
____ ___ ________ ______ ______.
______ _______ ____ ________ ________.
_______ ____ _______ _______ ______ __________ _____ __________ ___.
_______ _________ ___ __________ ___ ___.
______ _________ _______ ___ ____ _________ __________ ______ _____.
_____ _________ ___ ____ _____ _______ _________ ___ ___ ___ _____.
____ ________ ___ __________ ______ _____ _________ _______ ______ _____ _________ ___.
___ _______ ____ ________ _________ ______ _________ __________ ___ ________.
_________ ________ ____ ________ _____ ____ _________ __________ ___ ____.
____ ________ ________ _____ _______ __________ _______ ___.
__________ ______ ____ _____ _________ _____ _________.
Get Full Answer on WhatsApp

IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Write a Java program which accepts distance in kilo meters as input an
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→