Study guides

☆☆☆

Q: How do you sort out whether numbers you have are prime or composite?

Write your answer...

Submit

Still have questions?

Related questions

1, 2, 4, 13, 26, 52 2 and 13 are prime. 4, 26, and 52 are composite. 1 is neither.

No. 29 in not any sort of number AFTER 29!

Highlight the numbers and click on the sort button. You can sort ascending (smallest to largest) or descending (largest to smallest).

This is an invalid sort code. Sort codes are six numbers in this format: ##-##-##.

Yes, that's how quick-sort works.

You have to make sure both the numerator and denominator are prime numbers, and if they aren't, then it's not in simplest form. Also, the denominator shouldn't be divisible by the numerator, which sort of falls in to the prime number category. Hope this helped. :) I'm really good with numbers. :)

Select a column of numeric data in a range of cells, or make sure that the active cell is in a table column containing numeric data. To sort from low numbers to high numbers, click Sort Smallest to Largest.To sort from high numbers to low numbers, click Sort Largest to Smallest.On the Data tab, in the Sort & Filter group, do one of the following:

When you sort numbers from largest to smallest, or sort text from Z to A (in reverse alphabetical order).

Highlight the cells you want to sort and click on the sort button.

They are all positive numbers.

They used olden numbers!

It depends what you regard as being "special". Once you define the criteria for "special" you can formulate an algorithm that determines whether or not a given number meets that criteria. For instance, if you regard prime numbers as being special, you need a predicate to test whether a given number is zero, prime or composite. If prime then it is indeed special, otherwise it isn't. A predicate is a function that returns true or false depending on its input(s). As a simple example, if we regard even numbers as being special, then we need to test if the number has the prime factor 2. If so, it is special, otherwise it is not. We can test this by dividing the number by 2 and testing the remainder. If the remainder is zero, the number is even and is therefore special. We use the modulo operator (%) to determine the remainder after integer division: bool is_even (int n) { return (n % 2) == 0; }

People also asked