I need detail explanation of desired output and how values are printed.
Please help me
#include <stdio.h>
int main()
{
int n, i = 3, count, c;
printf("Enter the number of prime numbers to print\n");
scanf("%d", &n);
if (n >= 1) {
printf("First %d prime numbers are:\n",n);
printf("2\n");
}
for (count = 2; count <= n;)
{
for (c = 2; c <= i - 1; c++)
{
if (i%c == 0)
break;
}
if (c == i)
{
printf("%d\n", i);
count++;
}
i++;
}
return 0;
}
Answers
Answered by
2
Answer:
sorry i habe no knowledge about it
Similar questions
Biology,
6 months ago
English,
6 months ago
Social Sciences,
11 months ago
English,
11 months ago
Political Science,
1 year ago
Biology,
1 year ago
History,
1 year ago