write the program for prime numbers?
Answer Posted / paps
#include<stdio.h>
void main()
{
int a=1,i,j,b,n;
printf("enter the range\n");
scanf("%d",&n);
printf("prime number series between 1 to %d:n");
printf("%d",a);
while(i<=n)
{
for(j=2;j<i;j++)
{
b=i%j;
if(b==0)
break;
}
if(i==j)
printf("%d",i);
i++;
}
getch();
}
| Is This Answer Correct ? | 8 Yes | 4 No |
Post New Answer View All Answers
Explain about the functions strcat() and strcmp()?
Explain what is wrong with this program statement? Void = 10;
Explain low-order bytes.
Write a function that will take in a phone number and output all possible alphabetical combinations
What is #ifdef ? What is its application?
What is the right way to use errno?
how logic is used
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What is the modulus operator?
Process by which one bit pattern in to another by bit wise operation is?
What is a loop?
In C programming, what command or code can be used to determine if a number of odd or even?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
what are non standard function in c
Why is c called "mother" language?