Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write the program for prime numbers?

Answer Posted / sudesh kumar

#include<iostream.h>
#include<conio.h>
void main()
{
int no,i,r,p=1;
cout<<"enter a no";
cin>>no;
for(i=2;i<no;i++)
{
if(r==no%i)
{
p=0;
break;
}
}
if(p==0)
{
cout<<"the prime no";
}
else
{
cout<<"the no is note prime";
}
getch();
}

Is This Answer Correct ?    13 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does c value mean?

1261


hi send me sample aptitude papers of cts?

2220


What is a good data structure to use for storing lines of text?

1139


What is a header file?

1136


Explain Basic concepts of C language?

1235


Why is sizeof () an operator and not a function?

1089


What are near, far and huge pointers?

1115


Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250

2023


What is the code for 3 questions and answer check in VisualBasic.Net?

2208


What is the use of bit field?

1235


Explain what is the use of a semicolon (;) at the end of every program statement?

1261


Who is the main contributor in designing the c language after dennis ritchie?

1052


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

1904


Can you subtract pointers from each other? Why would you?

1005


When should a far pointer be used?

1186