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...


how i m write c program 1.check prime number 2.prime number
series



how i m write c program 1.check prime number 2.prime number series..

Answer / sulthan

#include<stdio.h>
void main()
{
int a,i,n=0;
printf("\nEnter the Number");
scanf("%d",&a);
for(i=1;i<=a;i++)
if(a%i==0)
n++;
if(n=2)
printf("Prime")
else
printf("NOT Prime");
}

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More C Interview Questions

A B C D E F G F E D C B A A B C D E F F E D C B A A B C D E E D C B A A B C D D C B A A B C C B A A B B A A A

2 Answers  


How do I send escape sequences to control a terminal or other device?

0 Answers  


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

0 Answers  


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

0 Answers   Infosys,


What is a pointer in c plus plus?

0 Answers  


What is meant by global static? why we have to use static variable instead of Global variable

4 Answers   L&T,


any "C" function by default returns an a) int value b) float value c) char value d) a & b

0 Answers  


What is the difference b/w Structure & Class?

3 Answers  


What are the different types of linkage exist in c?

0 Answers  


how we do lcm of two no using c simple if while or for statement

1 Answers  


program to find the ASCII value of a number

8 Answers  


while initialization of two dimensional arrays we can initialize like a[][2] but why not a[2][] is there any reason behind this?

4 Answers   Aptech,


Categories