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

I know this is long but please I really need someone's help. Given the function f(x)=4(2)^x, section A is from X=1 to X=2 and section B is from X=3 to X=4. Part
Which describes a way geography influenced the differences among Native American ways of life? A. Living near the ocean allowed the Mound Builders to subsist on
What is thr proper nonun in the sentence My horse's name is oatmeal
If x + y = 9, z + y = 12, and z + x = 11, what is the average (arithmetic mean) of x, y and z?
amount of time needed for ecosystem recovery
Think about your house, condo or apartment. What part of your home would be like the mitochondria of the cell? Why?reproduction all living things need cells
Tammy solved these problems. 18 ÷ 6 = 18 ÷ 3 = 18 ÷ 1 = Which observation could Tammy make about the quotients after she had her solutions? A.
what statement Is true about secondary sources
what statement Is true about secondary sources
How does McDonalds use vertical integration to reduce competition and make the business more profitable?