write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer)

Answer Posted / karthik

void main()
{
int i,j,m;
for(i=1;i<=100;i++
{
m=0
for(j=1;j<i;j++)
{
if(i%j==0)
m++;
}
if(m==0)
printf("%d",i);
getch();
}

Is This Answer Correct ?    54 Yes 87 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various types of control structures in programming?

628


What is a nested formula?

605


What is use of null pointer in c?

570


What does 1f stand for?

614


What are the applications of c language?

626






Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

1520


What are structures and unions? State differencves between them.

619


List the different types of c tokens?

628


Write a program to reverse a given number in c language?

620


What is a function simple definition?

618


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

639


Multiply an Integer Number by 2 Without Using Multiplication Operator

320


Is array name a pointer?

605


a c code by using memory allocation for add ,multiply of sprase matrixes

2302


In a header file whether functions are declared or defined?

629