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
alexgriva [62]
3 years ago
6

I give brainliest.

Computers and Technology
1 answer:
dezoksy [38]3 years ago
6 0

Answer:

D.

Explanation:

Code won’t <em>usually</em> recognize statements like humans do, code has to be consistent unlike human speech.

You might be interested in
What is a short example of public domain?
ikadub [295]
Something that isn't subject to copyright.
6 0
3 years ago
6.25 (Prime Numbers) A positive integer is prime if it’s divisible by only 1 and itself. For example, 2, 3, 5 and 7 are prime, b
faltersainse [42]

Answer:

  1. public class Main {
  2.    public static void main (String [] args) {
  3.        for(int i = 2; i < 10000; i++){
  4.            if(isPrime1(i)){
  5.               System.out.print(i + " ");
  6.            }
  7.        }
  8.        System.out.println();
  9.        for(int i = 2; i < 10000; i++){
  10.            if(isPrime2(i)){
  11.                System.out.print(i + " ");
  12.            }
  13.        }
  14.    }
  15.    public static boolean isPrime1(int n){
  16.      
  17.        for(int i=2; i <= n/2; i++){
  18.            if(n % i  == 0){
  19.                return false;
  20.            }
  21.        }
  22.        return true;
  23.    }
  24.    public static boolean isPrime2(int n){
  25.        for(int i=2; i <= Math.sqrt(n); i++){
  26.            if(n % i  == 0){
  27.                return false;
  28.            }
  29.        }
  30.        return true;
  31.    }
  32. }

<u></u>

Explanation:

Firstly, create the first version of method to identify a prime number, isPrime1. This version set the limit of the for loop as n/2. The for loop will iterate through the number from 2 till input n / 2 and check if n is divisible by current value of i. If so, return false to show this is not a prime number (Line 22 - 26). Otherwise it return true to indicate this is a prime number.

In the main program, we call the isPrime1 method by passing the i-index value as an argument within a for-loop that will iterate through the number 2 - 10000 (exclusive).  If the method return true, print the current i value). (Line 5 - 9)

The most direct way to ensure all the prime numbers below 10000 are found, is to check the prime status from number 2 - 9999 which is amount to 9998 of numbers.

Next we create a second version of method to check prime, isPrime2 (Line 31 - 40). This version differs from the first version by only changing the for loop condition to i <= square root of n (Line 33).  In the main program, we create another for loop and  repeatedly call the second version of method (Line 13 - 17). We also get the same output as in the previous version.

8 0
3 years ago
What should you do to organize a large amount of data??
Kay [80]
Set them up from least to greatest or create a number graph with all the data.
5 0
3 years ago
What do you understand by the terms:<br> I)input<br> ii)process<br> iii)storage<br> iv)output
agasfer [191]

an output device translate information processed by the computer into a form which you can understand.

input device are used to enter information such as letters, numbers, sounds or picture into a computer.

5 0
3 years ago
Types of Hazards Mitigation Measures
Fynjy0 [20]

Answer:

auto mechanics

Explanation:

keeps dirt and grease off hands

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which dialog box in microsoft excel do you use to set the rotation of text in a cell to a specific degree?
    14·2 answers
  • ....................................................
    9·1 answer
  • ∑_(A,B,C,D,E)▒〖(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30)〗
    8·1 answer
  • Write a program named SortWords that includes a method named SortAndDisplayWords that accepts any number of words, sorts them in
    10·1 answer
  • What is an Odometer (Driver's Ed)
    7·2 answers
  • You would like to find the average of cells C2, C3, and C4. What should the formula look like? = C2+C3+C4*3 =C2+C3+C4/3 =(C2+C3+
    15·2 answers
  • Kindly help me in this question by C PROGRAM or BY WORDINGS WHICH DESCRIBES THE PROBLEM SOLUTION
    6·1 answer
  • Which are the correct commands to create and run an ReactJS project?
    10·1 answer
  • What amount of memory enough to store alatter of the alphabet or store a small number​
    6·1 answer
  • What effect have computers had on your life?​​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!