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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of external class?

1072


What are the differences between new and malloc in C?

1154


How can I make it pause before closing the program output window?

1045


Write a program to check whether a number is prime or not using c?

1063


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

2011


What are the application of c?

1102


explain what is fifo?

1087


What is static memory allocation? Explain

1107


What's a good way to check for "close enough" floating-point equality?

1170


Tell me is null always defined as 0(zero)?

1091


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

6876


Why can arithmetic operations not be performed on void pointers?

1049


GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

1880


What does sizeof int return?

1086


What are the uses of null pointers?

1130