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
graphic designers can compress files in different formats . One of the formats ensures that the quality and details of the image
musickatia [10]

Answer:

The format that is used is: PNG

Explanation:

7 0
3 years ago
What is an analog computer?<br>​
tigry1 [53]

Answer:

It is a computer that is used to process analog data.

7 0
3 years ago
Read 2 more answers
Which design element is used to convey smoothness or roughness in a design
iris [78.8K]

Keyboard would be the correct answer

5 0
3 years ago
Convert the following four unsigned binary numbers to decimal and show your work:
Ber [7]

Answer:

23 ,21,10,63,13

Explanation:

We have to convert binary to decimal

10111 corresponding decimal number is

1\times 2^4+0\times 2^3+1\times 2^2+1\times 2^1+1\times 2^0=23

10101 corresponding decimal number is

1\times 2^4+0\times 2^3+1\times 2^2+0\times 2^1+1\times 2^0==21

01010 corresponding decimal number is

0\times 2^4+1\times 2^3+0\times 2^2+1\times 2^1+0\times 2^0=10

111111 corresponding decimal number is

1\times 2^5+1\times 2^4+1\times 2^3+1\times 2^2+1\times 2^1+1\times 2^0=63

001111 corresponding decimal number is

0\times 2^5+0\times 2^4+1\times 2^3+1\times 2^2+1\times 2^1+1\times 2^0=13

7 0
3 years ago
Matlab In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Cal
Ket [755]

Answer:

The complete Matlab code along with step by step explanation is provided below.

Matlab Code:

function Req=ParallelR(Number)

Number=input('Please enter the number of resistors: ');

if Number>10 | Number<=0

   disp('Invalid input')

return

end

R=0;

for i=1:Number

r=input('Please enter the value of resistor: ');

R=R+1/r;

end

Req=1/R;

end

Explanation:

Parallel resistance is given by

\frac{1}{Req} = \frac{1}{R_{1}} + \frac{1}{R_{2}} + \frac{1}{R_{3}}...+\frac{1}{R_{N}}

First we get the input from the user for how many parallel resistors he want to calculate the resistance.

Then we check whether the user has entered correct number of resistors or not that is from 1 to 10 inclusive.

Then we run a for loop to get the resistance values of individual resistors.

Then we calculated the parallel resistance and keep on adding the resistance for N number of resistors.

Output:

Test 1:

Please enter the number of resistors: 3

Please enter the value of resistor: 10

Please enter the value of resistor: 20

Please enter the value of resistor: 30

ans =       60/11

Test 2:

Please enter the number of resistors: 11

Invalid input

Test 3:

Please enter the number of resistors: 0

Invalid input

8 0
2 years ago
Other questions:
  • What is the purpose of lookup tables in spreadsheet software
    13·2 answers
  • Which amendment discussed in the unit do you think has the greatest effect on your life? Why?
    14·1 answer
  • The times per second an audio file is converted from analog to digital is the ______. audio file format bandwidth sample rate wa
    5·2 answers
  • When a range of IP addresses is set aside for client devices, and one of these IPs is issued to these devices when they request
    14·1 answer
  • What is needed to create a good problem statement?
    10·1 answer
  • Smart art can be used to create _____that highlights relationships betweeen two items
    8·2 answers
  • Peace is a fruit of the Spirit that comes from _______ .
    11·1 answer
  • A or an is a simple chip with two or more processor core
    5·1 answer
  • Which terms means device that converts one voltage to another ?
    15·1 answer
  • Which of the following are the most important reasons people in the 1920s were so interested in seeing lifelike stories in audio
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!