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
valina [46]
2 years ago
6

JAVA

Computers and Technology
1 answer:
ryzh [129]2 years ago
7 0

import java.util.Scanner;

public class JavaApplication33 {

   public static void main(String args[]) {

     Scanner scan = new Scanner(System.in);

     int total = 0;

     System.out.println("Enter positive numbers (-1 to stop)");

     while (true){

         

         int num = scan.nextInt();

         if (num == -1){

             break;

         }

         else{

             total += num;

         }

     }

     System.out.println("Sum is "+total);

     

}

}

I hope this helps!

You might be interested in
A. What is MS-Word ? Write its uses.
solmaris [256]

Answer:

MS word is Microsoft word and you can use MS Word in daily life and business to create professional-looking documents such as resume, letters, applications, forms, brochures, templates, business cards, calendars, reports, eBooks, and newsletters in speed with high quality.

Explanation:

6 0
3 years ago
Read 2 more answers
Computer World sells laptops separately from accessory products like docking stations, anti-virus software, and external hard dr
uysha [10]

Answer:

Optional product pricing

Explanation:

<em>Optional product pricing</em> occurs when a product is sold for a much lower price but complementary products or accessories are sold separately to generate profit.

A typical example is in the printer category, printer cartridges are sold separately from the printer when the one in the newly purchased printer runs out. The customer is forced to purchase new cartridges that the company benefits from as profits.

Optional product pricing is a strategy to provide less expensive technology while exploiting the frequent use of accessories to make a substantial profit.

6 0
3 years ago
What are the applications of computer in the field of study​
Reptile [31]

Answer: it is what it is

Explanation:

5 0
3 years ago
Read 2 more answers
1. How many bits would you need to address a 2M × 32 memory if:
Dominik [7]

Answer:

  1. a) 23       b) 21
  2. a) 43        b) 42
  3. a) 0          b) 0

Explanation:

<u>1) How many bits is needed to address a 2M * 32 memory </u>

2M = 2^1*2^20, while item =32 bit long word

hence ; L = 2^21 ; w = 32

a) when the memory is byte addressable

w = 8;  L = ( 2M * 32 ) / 8 =  2M * 4

hence number of bits =  log2(2M * 4)= log2 ( 2 * 2^20 * 2^2 ) = 23 bits

b) when the memory is word addressable

W = 32 ; L = ( 2M * 32 )/ 32 = 2M

hence the number of bits = log2 ( 2M ) = Log2 (2 * 2^20 ) = 21 bits

<u>2) How many bits are required to address a 4M × 16 main memory</u>

4M = 4^1*4^20 while item = 16 bit long word

hence L ( length ) = 4^21 ; w = 16

a) when the memory is byte addressable

w = 8 ; L = ( 4M * 16 ) / 8 = 4M * 2

hence number of bits = log 2 ( 4M * 2 ) = log 2 ( 4^1*4^20*2^1 ) ≈ 43 bits

b) when the memory is word addressable

w = 16 ; L = ( 4M * 16 ) / 16 = 4M

hence number of bits = log 2 ( 4M ) = log2 ( 4^1*4^20 ) ≈ 42 bits

<u>3) How many bits are required to address a 1M * 8 main memory </u>

1M = 1^1 * 1^20 ,  item = 8

L = 1^21 ; w = 8

a) when the memory is byte addressable

w = 8 ; L = ( 1 M * 8 ) / 8 = 1M

hence number of bits = log 2 ( 1M ) = log2 ( 1^1 * 1^20 ) = 0 bit

b) when memory is word addressable

w = 8 ; L = ( 1 M * 8 ) / 8 = 1M

number of bits = 0

5 0
3 years ago
Koi friend online hai kya​
Arlecino [84]

Answer:

yes

good afternoon friend

8 0
2 years ago
Other questions:
  • When you send an echo request message with the ping program, a successful attempt will return a(n) ______ message.
    8·1 answer
  • How do you ask someone for help?
    6·1 answer
  • In some cases, certain Hyper-V guest operating system features do not function properly using the operating system's own device
    9·1 answer
  • Which These operating systems use a graphical user interface?
    6·1 answer
  • How Can I add a image in an HTML program?​ please tell
    6·1 answer
  • Please help! I tried this by myself. But I am not sure if this is right.
    8·2 answers
  • What type of web provides a framework that allows data to be shared and reuse to deliver
    9·1 answer
  • NEED HELP ASAP
    13·2 answers
  • Under the Home tab, controls for aligning text and objects can be found in the
    5·2 answers
  • ________ is interpreted. Group of answer choices A. Python B. C C. C D. Ada E. Pascal
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!