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

Is register a keyword in c?

633


Why does notstrcat(string, "!");Work?

642


Explain the difference between malloc() and calloc() in c?

576


What is .obj file in c?

648


what are the 10 different models of writing an addition program in C language?

1437






int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1126


Why is structure padding done in c?

641


Explain how do you print only part of a string?

650


Explain c preprocessor?

683


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

668


Is anything faster than c?

585


Why C language is a procedural language?

621


Explain how can you tell whether two strings are the same?

580


Is r written in c?

722


Where static variables are stored in c?

584