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
lakkis [162]
3 years ago
5

Write a (java) program with a class called Sum1, using a while loop to add 10 numbers entered from the key-board.

Computers and Technology
1 answer:
Ainat [17]3 years ago
5 0

This is a java program with a class called Sum1.

Explanation:

While loop is used to add 10 number.

import java.util.Scanner;

public class Sum 1

{

   public static void main(String args[])

   {

       int number, count, sum = 0;

       Scanner s = new Scanner(System.in);

       System.out.print("Enter the number:");

       number = s.nextInt();

       while(number > 0)

       {

           count = number % 10;

           sum = sum + n;

           number = number / 10;

       }

       System.out.println("Sum of Digits:"+sum);

   }

}

You might be interested in
In a ____ network, each computer or device is connected to multiple (sometimes all of the other) devices on the network.
snow_tiger [21]
Simple. the answer is DOMAIN
5 0
3 years ago
Which type of address is used on the Transport Layer of the OSI Model to identify the receiving application?
Marianna [84]

Answer:

Port Number

Explanation:

In the transport Layer of the OSI Model the port number is used to identify the receiving application. Temporary communication sessions are set up that enable data exchange, the two protocols used are Transmission Control Protocol(TCP) and the User Datagram Protocol(UDP) . Each port is assigned a number that identifies it according to its function. The range for some well-known ports is 0-1023.

5 0
3 years ago
An engine is described as being a V-6, 90-degree engine. Which one of the following statements about this engine is correct? A.
IrinaVladis [17]
<span>The statement about this engine is correct is that </span><span>B. The angle between the two rows of cylinders is 90 degrees. The other choices are incorrect because it does not describe the V-6 with 90-degree engine.</span>
5 0
3 years ago
6. Which of the following statements is true of the Internet?
ExtremeBDS [4]
It’s accessible to everyone across the globe
7 0
2 years ago
Making extra copies of data and program?
Vladimir79 [104]

What sup with this website

8 0
3 years ago
Other questions:
  • 1. Which of the following describes a way of memorizing a poem using a mnemonic device?
    15·1 answer
  • What is log in and log out?
    5·1 answer
  • Create one of these on your desktop start menu and use it to quickly open a folder, data file, program, or other object?
    13·1 answer
  • Why would you use a custom filter?
    11·1 answer
  • Which of the following ensures that dropped packets are resent?
    9·1 answer
  • Given a vector of students, the function FinalAvg is supposed to return the average final exam score across all the students in
    6·1 answer
  • Write an expression to compute the quartic root of x. the quartic root of a number is the square root of its square root. exampl
    11·1 answer
  • In order to be an effective employee who knows recent information on loans and laws, in what topic should your information be cu
    5·1 answer
  • Write a method, findMax(), that takes in two integers and returns the largest value. Ex: If the program input is: 4 2 the method
    8·1 answer
  • | HELP PLS! C++ Sorting arrays can be performed using either Selection Sort or Insertion Sort or
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!