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
sertanlavr [38]
3 years ago
8

This the code from the last post I did

Computers and Technology
1 answer:
Andrew [12]3 years ago
3 0

import java.util.Scanner;

public class JavaApplication86 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       int x = 0, c = 0, sum = 0;

       while (true){

           x = scan.nextInt();

           System.out.println("You entered: "+x);

           if (x == -1){

               break;

           }

           sum += x;

           c++;

       }

       System.out.println("The sum is "+sum);

       System.out.println("You entered "+c +" numbers");

   }

   

}

This works for me. Instead of subtracting one from c and adding one to sum, I used an if statement to break away from the while loop if the entered number is -1.

You might be interested in
What is communication barriers?​
SSSSS [86.1K]

Answer:

A communication barrier is anything that prevents us from receiving and understanding the messages others use to convey their information, ideas and thoughts.They can interfere with or block the message you are trying to send.

7 0
3 years ago
Read 2 more answers
Which of the following is an example of a data base?
mihalych1998 [28]

See how long I can hold the key down. I forgot there was a max :/

 

hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

7 0
3 years ago
Hi good morning
Natali5045456 [20]

Answer:

1. SSH/Telnet.

2. SMTP.

3. DNS.

4. DHCP.

5. HTTPS/SSL.

6. FTP

Explanation:

1. Provides connections to computers over a TCP/IP network: the standard protocol used for this is SSH/Telnet, through port number 22 and 23 respectively.

SSH is acronym for secure shell.

2. Sends e-mail over a TCP/IP network: SMTP using port number 25.

SMTP is an acronym for Simple Mail Transfer Protocol and it uses the standard port number of 25 to provide clients with requested services.

3. Translates URLs to IP address: DNS using port number 53.

A Domain Name System (DNS) can be defined as a naming database in which internet domain names (website URLs) are stored and translated into their respective internet protocol (IP) address. This simply means that, DNS is used to connect uniform resource locator (URL) or web address with their internet protocol (IP) address.

4. Automates assignment of IP address on a network: DHCP using port number 67.

Dynamic Host Configuration Protocol (DHCP) is a standard protocol that assigns IP address to users automatically from the DHCP server.

5. Securely transports web pages over a TCP/IP network: HTTPS/SSL using port number 443.

HTTPS is acronym for Hypertext Transfer Protocol Secure while SSL is acronym for Secure Sockets Layer (SSL).

6. Transports files over a TCP/IP network: FTP using port number 20 or 21.

FTP is an acronym for file transfer protocol.

8 0
3 years ago
Read 2 more answers
When reviewing the tracked changes in a document, what are some options for addressing edits? Check all that apply. Remove all e
sineoko [7]

Answer:

1. reject all changes

2. accept all changes

3. accept and move to next

Explanation:

In Microsoft Word, when reviewing the tracked changes in a document, there are some options for addressing edits that are available to the computer users.

These available options are:

1. reject all changes

2. accept all changes

3. accept and move to next

To access tracked changes in a Microsoft Word document, a user will have to

> click on the Review tab,

> then go to Tracking and

> select Track Changes.

6 0
3 years ago
Read 2 more answers
I have one big question <br><br><br> WHAT CAN I DO WHEN I'M BORED
disa [49]

Answer:

You can start watching Your lie in april. Its awesome anime show about a girl who plays violin and a boy who played piano and he really likes her but she has leg cancer and can only live for a few months.

Explanation:

Even though it sounds really heartbreaking, it is actually pretty cool and romantic and it is on netflix. You should check it out!

5 0
4 years ago
Read 2 more answers
Other questions:
  • It takes an older computer twice as long to send out a company's email as it does a newer computer. Working together, it takes t
    15·1 answer
  • Which markup language would be considered the most current for web design? HTLM, HTML5, XHTLM, XHTML 6
    14·2 answers
  • How has technology affected the way that you produce art like photographs?
    8·1 answer
  • Tom is the aerobics coordinator at a fitness center. He needs a more efficient way for his instructors to share information. Cla
    13·2 answers
  • Match the limits of the user with an appropriate design response. 1. severe arthritis, unable to type or use a mouse on a reliab
    11·1 answer
  • Why was the Internet first developed? Use details and information to explain your answer.
    6·1 answer
  • Can someone help me with this lab assignment? I really do not know what should I do?
    5·1 answer
  • The relationship between social media and the Internet is complex. Individual Internet behavior involves a myriad of factors tha
    6·1 answer
  • PLS HURRY<br> Look at the image below
    8·1 answer
  • How to mark a discussion as read on canvas dashboard.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!