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
Find the median and mean of the data set below: 29 17 40 12 29
quester [9]

answer:

median: 29

arrange the data in ascending order, and the median is the value in the middle. If there are an even number of values, the median would be the product of the two middle numbers. (12, 17, 29, 29, 40)

mean: 25.4

the mean of a set of numbers is the sum divided by the number of terms.

12 + 17 + 29 + 29 + 40 = 127 / 5 = 25.4

hope this helped!

6 0
2 years ago
Given a string variable named sentence that has been initialized , write an expression whose value is the the very last characte
Blizzard [7]
Strings can usually be dealt with as arrays of characters.

sentence[ -1 ]

sentence.substring( sentence.size() -1 );
8 0
3 years ago
Que se encarga de notar lo que pasa alrededor
Angelina_Jolie [31]

Answer: Es nuestro cerebro. Los ojos son las estructuras capaces de transformar las señales luminosas en impulsos eléctricos, los cuales viajan al cerebro y, una vez ahí, él se encarga de transformar estas señales eléctricas en lo que vemos realmente. Y lo mismo pasa con todos los otros sentidos.

Explanation:

7 0
3 years ago
from january 2005 through july 2015, approximately how many electronic data records in the United States were breached, exposing
Brums [2.3K]
From January 2005 through July 2017, approximately 853 million electronic data records in the US were breached.
This allowed the attackers to take control over people's personal data, such as their various credit card numbers, and other important data, as well as their addresses, etc. The cyber police, as well as the regular police have been working hard to stop this from happening, but the hackers are very strong and smart.
4 0
3 years ago
Are the blank space around the edges of the page
Law Incorporation [45]

Answer:

The blank space around the edges of a sheet of paper — as with the page of a book — that surrounds the text is called the margin.

8 0
2 years ago
Other questions:
  • 1. Why do you think coding languages generally include the ability to create comments? What would those comments be used for? In
    10·1 answer
  • Micheal has increased the contrast of the given picture. Which feature or menu option of a word processing program did he use? A
    15·1 answer
  • Using the notation exemplified in following question , list a set of tables and attributes (and identify keys) to represent the
    10·1 answer
  • Write a C function which mimics the behavior of the assembly language function below. Note that this time, the assembly language
    10·1 answer
  • Explain in a few sentences the difference between analytical papers and argumentative papers.
    8·2 answers
  • Which of the following are mass communication methods? (Select all that apply.)
    9·1 answer
  • If you want to change the smart quote settings, what steps should you follow to find them?
    5·1 answer
  • Was just testing how this works, no actual question; feel free to take the points anyways though. ​
    13·1 answer
  • Dennis would like to include a video in a presentation. The source of the video is on the internet, but he would like to ensure
    10·2 answers
  • This is used to copy information from cell to cell in the spread sheet
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!