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

Which organelle is used to store water? a. chloroplastb. lysosomec. nucleusd. vacuoleILL MARK YOU BRAINLEST
Quisiera saber la respuesta de este ejercicio
Why did US and French diplomats fail to smooth relations between the two countries in 1796?
they are constructing a house in passive voice in all 12 tenses please​
Help me with 2 and 3
Gary's Pizzeria made 45 pizzas. 31 of the pizzas had thin crust and the rest had thick crust, What is the ratio of the number of thin crust pizzas to the number
Round 19.432 to the nearest whole.
Need Help Please Steps are in the picture. This is for a coding class that I am taking. I did manage to get the first step done but all of the other ones are
Read the prompt and then write your response, using the guidelines: Your pen-pal from Puebla, Mexico, sent you an email that describes what she does on weekends
Someone pls help me With this I will make you as brain