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
TEA [102]
3 years ago
5

Write an application named Perfect that displays every perfect number from 1 through 10,000. A number is perfect if it equals th

e sum of all the smaller positive integers that divide evenly into it. For example, 6 is perfect because 1, 2, and 3 divide evenly into it and their sum is 6.

Computers and Technology
1 answer:
frozen [14]3 years ago
6 0

Answer:

Required code is given and the output is also attached.

Explanation:

public class Perfect {

   public static void main(String[] args) {

       int i, num, sum;

       System.out.println("The perfect numbers between 1 and 1000 are");

       num = 1;

       while (num <= 1000) {

           sum = 0;

           for (i = 1; i < num; i++)

               if (num % i == 0)

                   sum += i;

           if (sum == num)

               System.out.println(num + " ");

           num++;

       }

   }

}

You might be interested in
Consider the following definition of a recursive method. public static int mystery(int[] list, int first, int last) { if (first
ozzi

Answer:

c. 27

Explanation:

  • In recursion method, a method calls itself until a condition becomes true and returned back. In mystery(), at first time, first is 0 and last is 4. Condition is checked and 0!=4 so else part is executed in which again mystery is called with first as 1 and last 4. This will go again and again until first=4.
  • When first=4 it is also equal to last so if part is executed and alpha[4] is returned which is 9, now it comes alpha[3] +9 which is 8+9 =17 .
  • It is returning values to its previous calls that is why it will reduce to alpha[0]+alpha[1]+alpha[2]+17 which is nothing but sum of all elements of a alpha
  • Then, 1+4+5+8+9=27.
5 0
3 years ago
Which 3 statements are true about journal entries? (Quick Books)
Sonbull [250]

Answer:

1.Total debits must equal total credits

4.When posting to the accounts receivable account, you must specify a customer

5.You can post to multiple accounts receivable and/or accounts payable accounts in the same journal entry

Explanation:

1.

A Journal entry follows the concept of double-entry. In the double-entry principle, a debit entry equals a credit. After posting all the required entries total debits are equal to the total credits.

4.

The business makes sales to customers. Some sales are made on cash or some are made on credit. In the case of credit sales, the receivables are made. To record the credit sale entry we must specify the customer in the debit entry against the credit entry of sales.

5.

in recording the credit sales or purchases multiple receivable or payable accounts can be used and a single entry of sales of purchases can be posted against these accounts. For example

Journal Entry with multiple receivables accounts.

DR. Customers A $1,000

DR. Customers B $2,000

DR. Customers C $3,000

CR. Sales ______$6,000

6 0
2 years ago
How can you refer to additional information while giving a presentation?
dimulka [17.4K]
The most common way I've seen is to have a slide where you have the additional information. It can be phone numbers, email address, websites, books, anything you want to refer to.
People tend to photograph these slides so make sure the information is error free and that you add you own marketing info to the slide as well.

5 0
2 years ago
What is a sub folder in ICT​
Temka [501]

Answer:

A sub folder is a folder within a folder.

Explanation:

A subfolder on a computer is a folder inside of another folder. For example, someone may create a main folder for their music and then create subfolders to separate the genres of music.

Additionally, "sub" prefix means "under" or within.

Hope this helps.

3 0
1 year ago
Read 2 more answers
2.4 Code Practice: Question 2
trasher [3.6K]

Answer:

num = float(input("Enter a number: "))

x =int(num)

y =float(num - x)

print(y)

Explanation:

It works I just did it!

5 0
2 years ago
Other questions:
  • Match each storyboarding technique with its appropriate description
    9·1 answer
  • One way to describe the note-taking tool eNotes is to call it an<br> Someone help ._.
    9·2 answers
  • What are the six critical components of an information system? Select three of the six components, and describe a potential vuln
    15·1 answer
  • What is the way of retrieving information from the Internet?
    11·2 answers
  • How can you add contrast between text and headlines in a document? increase the font size of the headline make the headline long
    6·1 answer
  • Who is the three president of somalia​
    8·2 answers
  • In series connection, if we have two symmetric devices connected with 10 V battery, voltage for each device will be.. .5V or 10V
    10·1 answer
  • What is digital museum​
    9·2 answers
  • Give the an example of the following .<br>a.)typing software<br>​
    10·2 answers
  • If you added the formula =SUM(B1:B5) to a spreadsheet, what would it do?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!