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
Genrish500 [490]
4 years ago
7

Write a program that reads in a list of numbers, and for each number, determines and prints out whether or not that number is ab

undant.
Computers and Technology
1 answer:
adelina 88 [10]4 years ago
7 0
int IsAbundant(int n)
{
int divisorSum = 0;
for (int i = 1; i < n; i++) {
 if ((n % i) == 0) {
  divisorSum += i;
 }
}
return divisorSum > n;
}


int main()
{
int number = 0;
do {
 printf("Enter a number (0 to quit): ");
 scanf_s("%d", &number);
 if (IsAbundant(number)) {
  printf("%d is abundant!\n", number);
   } else
   {
    printf("%d is not abundant.\n", number); }
   } while (number > 0);

   return 0;
}

You might be interested in
Your unit has an upcoming training event. What form is used to record and maintain document numbers for ammunition documents?
aleksklad [387]

Ammunition documents which caries bullet, fuses extra should be numbered properly.

<u>Explanation:</u>

A document number or page number should be well organized and he or she coordinates with assistant trainers who have involved it.

Since it is a training event. The trainer has to have a checklist and make as fill with page number and make sure page numbers are strictly followed during the training session. If any page number is misplaced through the training session it will be embracing the situation for trainer and student or staff who get the training.

8 0
3 years ago
Why is my computer getting slower and slower? What can i do without buying a virus scanner?
NeTakaya
It could be that your computer is simply getting older and more worn out, I suggest downloading MalwareBytes, it's a free anti-virus software that I use personally.
7 0
3 years ago
Read 2 more answers
Que puedo escanear desde el celular respuesta en español por favor​
LuckyWell [14K]
Perdón no entendí tu pregunta
7 0
3 years ago
When a packet is passed down to the next lower layer, it is _____________ into the lower-layer packet?
Anon25 [30]
<span>encapsulated /that should be the answere hmu if it not

</span>
6 0
3 years ago
Companies that have a well-established brand name or reputation in a particular line of business usually want the URLs for their
ICE Princess25 [194]

Answer:

The answer is "True"

Explanation:

In the web browser, when you type and search any name of the company or any brand name so, it will be given the full detail of the company or the specific brand, and it also provides the new collection of the brand. which allows you to buy the product online, that's why we use the URL, that reflects the reputation of a company or the brand.

4 0
3 years ago
Other questions:
  • Using tracking code, Google Analytics can report on data from which systems? A. E-commerce platforms.B. Mobile Applications.C. O
    11·1 answer
  • PHP Create a for loop that initialize with the variable $i = 10 The loop outputs $i as long as $i is greater than 1 using for lo
    9·1 answer
  • What should htc's os strategy be? should it stick with windows mobile and android? should htc build its own platform? add/drop o
    6·1 answer
  • • Open your Netbeans IDE and answer the following question
    5·1 answer
  • Complete the following sentence by choosing
    11·2 answers
  • Change 'What do they do' into passive voice​
    9·2 answers
  • What is the difference between spyware and adware?
    8·2 answers
  • Create a multimedia project that contains the text element and all the contents that you have studied about that element
    13·1 answer
  • To break a text string into several lines, which means that the text string continues on the next line, the _____ character shou
    8·1 answer
  • after adding a sound to a slide, the audio tools tab will allow you to apply artistic effects and quick styles to your sound ico
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!