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

joe drew this bar model to find the unknown number of balls. find the unknown number? 106 ? = 250
Can someone help me?
1. What mistake did he make in the process? 2. What should his final numerator be? 3. What should his final denominator be?
What volume of water vapor will be produced from the reaction of 24.65 L of oxygen?
Write pqqqqrr in exponential form. p·q^4·r^2
an immunization is called a
Amar and Sang mowed lawns to earn money to go on a trip at the end of the month. They both mowed the same number of lawns. Amar earned $20 for each lawn he mow
Gasoline sells for 1.5 euros/liter in Bonn. What is the price in U.S. dollars per gallon?
Write three equivalent ratios for the given ratio.The ratio of clown fish to angel fish at a pet store is 5:4. The ratio of angel fish to goldfish is 4:3. There
It costs $3 to bowl a game and $2 for shoe rental. Write an expression for the cost of G games