1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Orlov [11]
3 years ago
7

C program to generate prime numbers from 1 to 100.Also count prime numbers. ​

Mathematics
1 answer:
Musya8 [376]3 years ago
8 0

Answer:

Step-by-step explanation:

#include <stdio.h>

int main()

{

  int num1, num2, flag_var, i, j;

 

  /* Ask user to input the from/to range

   * like 1 to 100, 10 to 1000 etc.

   */

  printf("Enter two range(input integer numbers only):");

  //Store the range in variables using scanf

  scanf("%d %d", &num1, &num2);

 

  //Display prime numbers for input range

  printf("Prime numbers from %d and %d are:\n", num1, num2);

  for(i=num1+1; i<num2; ++i)

  {

     flag_var=0;

     for(j=2; j<=i/2; ++j)

     {

        if(i%j==0)

        {

           flag_var=1;

           break;

        }

     }

     if(flag_var==0)

        printf("%d\n",i);

 }

 return 0;

}

You might be interested in
12. I don’t know how to do it
Nostrana [21]

Answer:

BC = 50

Step-by-step explanation:

I believe what I'm doing is correct but to be completely honest with you, I haven't done this in a while lol

Okay so...

You would do

1. 6y-16 = 4y+6

You would subtract 4 from 6...

2. 2y-16 = 6

You would then add 16 to 6...

3. 2y = 22

Then, divide 2 from 22...

4. y = 11

Substitute into BC...

5. 6 (11) - 16 = 66 - 16 = 50

Then, you get your final answer...

6. BC = 50

I hope it's right. Good luck ^^

8 0
3 years ago
Please help: first to answer gets 50 points
kaheart [24]
It would be perpendicular
3 0
3 years ago
Read 2 more answers
Which graph shows the following:
svetlana [45]

Answer:

The first one, the one with A' at -4,5

Step-by-step explanation:

To find which graph shows the translation you first find a point that is easy to follow, ideally one that is along an axis.

Point A would be easy to follow, since it's roughly at (0,3) initially.

Then we apply the translation. T (-4,2) means the X value is moved to the left, subtracted 4 units... while the Y value is moved up, adding 2 units.

So, the point A that was at (0,3) becomes A' at (0 - 4, 3 + 2), or (-4,5).

7 0
4 years ago
Which logarithmic graph can be used to approximate the value of y in the equation 4^y=8
WINSTONCH [101]
\bf \textit{exponential form of a logarithm}\\\\&#10;log_{{  a}}{{  b}}=y \implies {{  a}}^y={{  b}}\qquad\qquad &#10;%  exponential notation 2nd form&#10;{{  a}}^y={{  b}}\implies log_{{  a}}{{  b}}=y &#10;\\\\&#10;-------------------------------\\\\

\bf 4^y=8\implies log_4(8)=y\qquad &#10;\begin{cases}&#10;4=2^2\\&#10;8=2^3&#10;\end{cases}\implies (2^2)^y=2^3&#10;\\\\\\&#10;2^{2y}=2^3\impliedby \textit{since the bases are the same, so are the exponents}&#10;\\\\\\&#10;2y=3\implies y=\cfrac{3}{2}\implies y=1\frac{1}{2}\quad thus\quad &#10;\begin{cases}&#10;x=8\\&#10;y=\frac{3}{2}&#10;\end{cases}

so.. check your graphs
7 0
4 years ago
What is the image point of (3, 7) after a translation right 5 units and up 1 unit?
navik [9.2K]

I don't actually know, im not smart, I'm just answering for the points

3 0
3 years ago
Read 2 more answers
Other questions:
  • How do I solve 8x+37+16x-9
    10·1 answer
  • Solve the equation given in Exercise 15 with and without using the LCD of the fractions. Are your answers the same?
    10·1 answer
  • Translate the word phrase into a math expression: nine more than the quotient of a number and five
    13·1 answer
  • Solve 5x + 3x - 6 = 42​
    7·1 answer
  • John can send up to 250messages each month. So far he has sent 141 messages this month let t represent the number of messages he
    7·2 answers
  • What steps should be taken to calculate the volume of the prism using the formula V = Bh?
    11·2 answers
  • There were 100 people at a real estate conference. 31% of them were women. How many women were at the real estate conference?
    6·1 answer
  • 10-5x=3(x-4)-2(x+7)-------
    14·2 answers
  • Carter invested 540 in an account paying an interest rate of 4 and 7/8% compounded monthly. Jack invested 540 in an account payi
    10·1 answer
  • Write the equation of the line that passes through the given points. (-1,16.5) And (0,6.5)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!