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
svlad2 [7]
3 years ago
9

Write an algorithm and draw a flowchart to count the digits present in the given integer. ​

Computers and Technology
1 answer:
saul85 [17]3 years ago
8 0

Answer:

The algorithm is as follows:

Input number  

count = 0

while(number not equal 0)

   number = number / 10

   count = count + 1

end

Print count

Explanation:

This gets input for the integer number

 Input number  

This initializes count of digits to 0

count = 0

The following loop is repeated while number is not 0

while(number not equal 0)

This performs integer division of the number by 10; the resulting division is saved in variable number

   number = number / 10

The count variable is incremented by 1

   count = count + 1

The loop ends here

end

This prints the count of integers

Print count

<em>See attachment for flowchart</em>

You might be interested in
If num is an int which expression always evaluates to true if num holds an odd number
kherson [118]

num%2==1

The modulo operator (%) divides the left hand side by the right hand side and returns the remainder. When dividing an odd number by 2 there will always be a remainder of 1.

8 0
4 years ago
#Write a function called "in_parentheses" that accepts a
zimovet [89]

Answer:

import regex as re

def in_parentheses(a_string):

   regeX = re.compile(".*?\((.*?)\)")

   result = re.findall(regeX, a_string)

   return str(result).replace("[","").replace("]","")

print("test 1: "+in_parentheses("Open ( only"))

print("test 2: "+in_parentheses("This is a sentence (words!)."))

8 0
4 years ago
Which steps will create a new blank word document
mrs_skeptik [129]

Answer:

Open word

File > New

Select a template

8 0
4 years ago
Which of the statements below explains why a budget is useful
Papessa [141]

The answer is D. All the other answers describe what a budget CAN be like, not necessarily what it is for everyone, if that makes sense.

8 0
3 years ago
A __________ is software that helps a peripheral device establish communication with its host device.
vladimir2022 [97]

Answer:

Answer is Device Driver

3 0
3 years ago
Other questions:
  • propose,two new ,proudly South African ways,which you can visualize that the IoT,can be used at work to make life better.
    12·1 answer
  • Nicole wants to create a database to collect information about videos in her video rental store. She would like to use the datab
    9·1 answer
  • 1. Which of the following is required to create a computer simulation?
    11·1 answer
  • Is there anyone willing to sign into my google classroom account and help with my work :( i had surgery on monday and have about
    14·2 answers
  • Which of the following statements about the placement of illustrations in documents is true?
    12·1 answer
  • How do you get the value of an element in an array? And how about for an ArrayList?
    14·1 answer
  • Formulate it as a tree search problem.
    15·1 answer
  • How many of yall are willing too sub to my channel called "Space Juice" with around 200 subs?!​
    14·1 answer
  • How do you detect my account for brainly?
    14·1 answer
  • What's good computing?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!