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 a c program that if the given number is prime, and
their rearrangement(permute) of that number is also prime.
Ex: Input is "197" is prime
Output: 791,917,179 is also prime.
Please any one tell me tha code for that

Answer Posted / chaskar tejal

#include<stdio.h>
#include<conio.h>
void main()
{
int a;
printf("197 is prime");
if a%2 || a%3||a%5||a%7
getch();
}

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain is it valid to address one element beyond the end of an array?

1213


Are the outer parentheses in return statements really optional?

1115


Can we declare a function inside a function in c?

1037


5 Write an Algorithm to find the maximum and minimum items in a set of ā€˜n’ element.

2109


Is multithreading possible in c?

1011


What do you understand by friend-functions? How are they used?

1207


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1071


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

1100


What is the use of function overloading in C?

1170


Write a program on swapping (100, 50)

1124


Why cant I open a file by its explicit path?

1033


Can include files be nested?

1108


What is static and volatile in c?

1221


Explain b+ tree?

1067


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

2786