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
Katen [24]
3 years ago
5

JAVA

Computers and Technology
1 answer:
Anuta_ua [19.1K]3 years ago
7 0

import java.util.Scanner;

public class JavaApplication59 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       double north = -180, south = 180, east = -90, west = 90;

       while (true){

           System.out.println("Please enter the longitude:");

           double lon = scan.nextDouble();

           System.out.println("Please enter the latitude:");

           double lat = scan.nextDouble();  

           if (lon > 90 || lon < -90 || lat >180 || lat < -180){

               System.out.println("Incorrect Latitude or Longitude");

           }

           else{

               if (lat > north){

                   north = lat;

               }

               if (lat < south){

                   south = lat;

               }

               if (lon > east){

                   east = lon;

               }

               if (lon < west){

                   west = lon;

               }

           }

           System.out.println("Would you like to enter another location (1 for yes, 0 for no)?");

           int choice = scan.nextInt();

           if (choice == 0){

               break;

           }

       }

       System.out.println("Farthest North: "+north);

       System.out.println("Farthest South: "+south);

       System.out.println("Farthest East: "+east);

       System.out.println("Farthest west: "+west);

   }

   

}

I hope this helps!

You might be interested in
An example of an unaltered material used to create objects is
ehidna [41]
<span>At mine site of Rijckholt in the Neatherlands, archaeologists ...

</span>
3 0
3 years ago
Write a loop that prints each country's population in country_pop. Sample output with input:
Nostrana [21]

Answer:

  1. country_pop = {
  2.    'China': 1365830000,
  3.    'India': 1247220000,
  4.    'United States': 318463000,  
  5.    'Indonesia': 252164800
  6. }  
  7. for key in country_pop:
  8.    print(key + " has " + str(country_pop[key]) + " people")

Explanation:

The solution code is written in Python 3.

Given a dictionary, country_pop with data that includes four country along with their respective population (Line 1-6). We can use for in loop structure to traverse through each of the key (country) in the dictionary and print their respective population value (Line 7-8). The general loop structure through is as follow:

                    for key in dict:

                         do something

One key will be addressed for each round of loop and we can use that key to extract the corresponding value of the key (e.g. country_pop[key]) and print it out.

4 0
4 years ago
What does it mean when we say that Unity “handles terrain natively,” and how can that assist in game development?
ale4655 [162]

When we say that Unity “handles terrain natively,” and how can that assist in game development, we mean that all or anybody can produce or create the terrain, as they want or intended for it to be instead of a person going out to  download other assets so as to be able to do so.

The sculpting tool and key/mouse commands would you use to most easily create a “plateau” in your terrain is the the paint height too

<h3>What is a sculpting tool?</h3>

There are a lot of tools such as chisels that are said to be used to carve away the stone, shape the forms, and finish the details.

Based on the materials used, a sculptor is one that uses a lot of techniques such as sewing to others.

Learn more about tools from

brainly.com/question/26694215

7 0
3 years ago
What is difference between computer and smartphone
tiny-mole [99]

Answer: One is smaller than the other.

4 0
3 years ago
Application software sold with new device is called ________.
Vinil7 [7]

The name which is given to an application software which is sold with new device is called:

  • Killer application

<h3>What is a Killer Application?</h3>

This refers to the software which is necessary to the functioning of a core value of another technology.

With this in mind, we can see that because these application software are sold with new devices and are made to complement the core values of a tech, then they are referred to a killer app.

Read more about application software here:
brainly.com/question/1538272

4 0
3 years ago
Other questions:
  • Communication competence is _____.
    10·1 answer
  • What are small applications that can be accessed over the web?
    7·2 answers
  • When both gears are the same size what will they produce
    11·1 answer
  • Write the constructor for the Theater class. The constructor takes three int parameters, representing the number of seats per ro
    7·1 answer
  • Grooves and polished surfaces on desert pebbles are most likely caused by
    10·1 answer
  • The Word feature that would allow you to insert fields from an Access database into multiple copies of a Word document is called
    12·1 answer
  • Plz I need help 30 points
    14·1 answer
  • Which are options in the Form Tools Format tab?
    10·1 answer
  • What is range work book​
    8·1 answer
  • What would be an ideal scenario for using edge computing solutions?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!