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
Anyone help me with number 41.
Katarina [22]
It is te = t I yhink
8 0
3 years ago
List the five ethical rules that you feel are most important for one to follow when using the internet.
seropon [69]
1. Be smart
2. Do not tell anyone your personal info
3. Use reliable resources while looking up things (org,net,ect. no .coms)
4. ask your parents or guardian if you can go on a specific website And number 5 have fun!
7 0
3 years ago
Hiding an object, such as a diary, to prevent others from finding it is an example of:______________.
madreJ [45]

Answer:

Privacy

Explanation:

I'm not sure but it matches the description you gave.

4 0
2 years ago
Finish the code to search for a 7 in the array.
guapka [62]

Answer:

The complete code is as follows:

from array import *

myArr = array('f',[3, 5, 7,3, 10])

location = myArr.index(7)

print(str("7")+" is at position "+str(location+1))

Explanation:

I made corrections to the third line of the code and I added a line

This line gets the index of 7 from the array myArr using the index keyword

location = myArr.index(7)

This line prints the position of the 7 in the array

print(str("7")+" is at position "+str(location+1))

8 0
2 years ago
Qla
Olenka [21]

Answer:a

What are the activities a Database Designer will do if using the SDLC to design a Database [10]

Q1b

List the five main components of Access Database and state their uses [1

Explanation:

7 0
3 years ago
Other questions:
  • What is the definition of "potential energy"?
    14·2 answers
  • .<br> 1. Press the _______ key to move to the next cell in a row.
    14·2 answers
  • Which best describes color blindness?
    8·1 answer
  • What are two preferences a user can indicate for the Junk Email folder?
    15·2 answers
  • C:\windows\system32\drivers\etc\protocol is an example of a file ________. select one:
    5·1 answer
  • what is hyperlink a)the text contained in hypertext documents b)a service provided by the internet c) the location of web pge on
    12·1 answer
  • HELP ME PLEASEEEE
    8·1 answer
  • You can't cite Wikipedia, what are three ways that you can use it for your research?
    5·1 answer
  • 1.erros can easily be ____ 2.work is done in an ____ no mess environment 3.colors do not _____ and brushes are never ______ 4.st
    14·1 answer
  • How has the internet improved business communication worldwide
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!