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

Ten sodas and eight popcorns cost $80.00 Twenty sodas and twenty four popcorns cost $184 How much do one soda and one popcorn cost?
ANSWER QUICK PLEASEELook at the equations below. Find a pair of equations whose lines are perpendicular.​
Draw angle ABC of size 65°
Which of the following is the correct factorization of the polynomial below? 8x3 +64y3 OA. (4x+4y)(2x+8y) B. (2x+4y)(4x² - 8xy+16y²) C. (4x+2y)(4x² - 2xy + 16y²
If the molecular weight of an inorganic salt is 168.36 g/mol and the percentage composition of the salt is Cs =78.93% and Cl = 21.08%. Which of the following is
Which expression is equivalent to 8t 18-20t+147 2(4t910t+7) 1 2 (8t-18-20t+14) 3(4t910t+7) 2(8t1820t+14)
PLSS HELPPPP i really need help on these two questions
4. Use the arrows to move each item into the correct order. Click the "up" arrow to move the item up, or click the "down" arrow to move the item down. Once all
Carlos is hoping to save a least $200 in the next few weeks. His moms gives him $30, and he earns money each Saturday morning at his grandmother's store. Write
find all real solutions by factoring, 2x^2+13x=7