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]
3 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]3 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
What is hydraulic fracturing?
777dan777 [17]
The meaning of hydraulic fracturing is the process thats used 9 from 10 of natural gas wells in the U.S. where there are lots and millions of gallons of water, sand, chemicals and others that is pumped under the ground to divided and break apart the rocks which releases the gas.

hope this helped because i learned about this and i am sure :)
4 0
3 years ago
A message is sent to all hosts on a remote network. Which type of message is it?.
Nimfa-mama [501]

Answer:

a directed broadcast

Explanation:

4 0
1 year ago
You have found statistics on the Internet that you would like to use in your speech.
miss Akunina [59]

Answer:

You cite them correctly and that the statistics are real.

Explanation:

5 0
3 years ago
Explain the nature of documents that can be suitable for merging
nadezda [96]
It can be a letter, stationery , or any types of template containing the information that you want to send to the vendor or to the customer.

the documents should contain special field codes that you insert which names and addresses reference will be replaced with the information from the data source
4 0
3 years ago
Which option will Joan use to get a glimpse of how her presentation will look when she presents it to her audience? Joan will us
Murrr4er [49]

Since Joan wants to see what her presentation would look like in the eyes of her audience, it might be best for her to use the Slideshow view that is available at the bottom right side of her desktop view.

This option is a full-screen form of her Normal view in Microsoft PowerPoint. The Slideshow view is represented by the projector screen symbol next to the zoom in and out bar.

7 0
3 years ago
Read 2 more answers
Other questions:
  • To execute a prepared SQL statement, you can use the _______ and execute methods of the PDOStatement object to set parameter val
    9·1 answer
  • Which of the following is an example of a direct payment subsidy?
    12·1 answer
  • package dataStructures; /** * Class OrderedLinkedList. * * This class functions as a linked list, but ensures items are stored i
    8·1 answer
  • The CMS Quarterly Provider Update (QPU) is an online CMS publication that contains information about __________ currently under
    14·1 answer
  • Cuales son las caracteristicas de los celulares
    9·1 answer
  • Match the component to its function. resistor inductor capacitor battery transistor This component stores a temporary charge. ar
    7·2 answers
  • What is the HCF of smallest prime number and the smallest composite number?​
    12·1 answer
  • A user tells a help desk technician that their browser is displaying a message that a site can't be
    14·1 answer
  • Enthusiasm codehs 7.6.4 Write a function called add_enthusiasm that takes a string and returns that string in all uppercase with
    15·1 answer
  • Please i relly need this! ​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!