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
juin [17]
3 years ago
6

Plzz help me with this question.........

Computers and Technology
1 answer:
Zepler [3.9K]3 years ago
3 0

Answer:

please mark as brainliest!!

Explanation:

public class SumOfDigits{ public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.println("Please enter a number to calculate sum of digits"); int number = sc.nextInt(); // Remember number/10 reduces one digit from number // and number%10 gives you last digit int sum = 0; int input = number; while (input != 0) { int lastdigit = input % 10; sum += lastdigit; input /= 10; } System.out.printf("Sum of digits of number %d is %d", number, sum); // closing Scanner to prevent resource leak sc.close(); } }

You might be interested in
Which option of the AutoCorrect tool enables you to add and delete words that do not follow abbreviation rules?
stellarik [79]

Answer:

Replace text as you type.

Explanation:

Replace text as you type is the Autocorrect option that enables you to add and delete words that do not follow abbreviation rules. This tool is available under the PROOFING tab. For example, if you use a long phrase frequently, simply add it to the replace text as you type. For instance, if you type your address frequently, add 34 Willoughby Street, London, and abbreviate it to 34WS and it was replace it to the long phrase as you type 34WS.

5 0
3 years ago
Positive thinkers tend to
andreev551 [17]

Answer:

I would say D hope this helps

3 0
3 years ago
Read 2 more answers
So I try to login into my origin account and this popped up.(photo). But everytime I try to type in something I’m unable to clic
Oduvanchick [21]
You have to restart your computer or maybe use another internet browser to access the website your trying to reach
7 0
3 years ago
Sincerely is an example of a salutation true or false
Setler79 [48]
No, I don't think so.
5 0
3 years ago
Read 2 more answers
To display data in a certain manner, like alphabetical order, is called
taurus [48]

Answer:

D. Sorting

hope this helps!

6 0
2 years ago
Other questions:
  • You press the power button in order to start your computer but hear nothing and see nothing. Name 2 possible reasons for this.
    6·1 answer
  • In a packet voice communications system, a source transmits packets containing digitizedspeech to a receiver. Because transmissi
    6·1 answer
  • PLEASE HELP ME ASP<br> An ISDN carries a signal in digital form.<br><br> True<br><br> False
    12·2 answers
  • The insert options button lists formatting options. true or false.
    11·1 answer
  • It is used to select specific menu options, drag and drop options and to draw something on screen.
    6·1 answer
  • Can someone find out what this binary number thing is. Just find out the message, I'm having a difficult time
    13·1 answer
  • A location in memory which stores a value, the value can change as the program is running is
    12·1 answer
  • What is phishing?
    14·1 answer
  • Which camera is interchangeable<br><br> freeform<br><br> hybrid<br><br> DSLR<br><br> point and shoot
    15·1 answer
  • An international fast-food chain is looking for opportunities to leverage the Cloud to gain insights into customer data, includi
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!