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

Caan corporation will pay a $2.70 per share dividend next year. the company pledges to increase its dividend by 5.5 percent per year indefinitely. if you requir
What is the difference between parentheses and brackets in math?
Which of the following words or phrases is a dactyl? A. The dust B. In the night C. Elephant D. Friendly
The pressure exerted against the walls of the artery when the left ventricle contracts is called the:
Jaja wants to be a concert violinist more than anything in the world. She practices for hours, preparing for an audition at a prestigious music academy. Jaj
the face of the moon is only partially visible during which phase
Ahmed has five more CDs than one-half the number of CDs Julia has. In this situation, what does 1/2c+ 5 represent? the number of CDs Ahmed has the number of CDs
is a teacher considered physical capital
Which part of the First Amendment says that citizens are allowed to practice any religion they choose? A. The freedom of association clause B. The separ
What tactic did the aztecs use to strengthen their empire?