ramylan00
ramylan00 ramylan00
  • 12-12-2020
  • Computers and Technology
contestada

write c++ program from 1to 100 to find prime numbers using statement.

please help me​

write c program from 1to 100 to find prime numbers using statementplease help me class=

Respuesta :

th3g3ntl3man
th3g3ntl3man th3g3ntl3man
  • 19-12-2020

Answer:

int count;

for (int i = 1; i <= 100; i++){

count = 0;

for (int j = 1; j <=i; j++)

if (i%j==0) count ++;

if (count == 2) cout << i << " ";

}

Answer Link

Otras preguntas

A number cube is rolled 240 times. Six comes up 41 times. What is the theoretical probability of rolling a six
A dmz is a subnet of _____________ accessible servers placed outside the internal network.
during the cold war arms race, how did the hydrogen bomb differ from the atomic bomb
Where is Alcatraz? My teacher told me it’s in San Antonio
In to kill a mockingbird what was the depression? during which years
Find the ordered pairs for the x- and y-intercepts of the equation 2x − 6y = 24 and select the appropriate option below. (5 points) The x-intercept is (2, 0);
Pls help me with this plssss
The ______ carries visual impulses to the brain from the rods and cones.
Choose the correct vertex of the function f(x) = x2 - x + 2.
Besides 16 and 1 what is one factor of 16