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
Explain is it valid to address one element beyond the end of an array?
Are the outer parentheses in return statements really optional?
Can we declare a function inside a function in c?
5 Write an Algorithm to find the maximum and minimum items in a set of ānā element.
Is multithreading possible in c?
What do you understand by friend-functions? How are they used?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What is the use of function overloading in C?
Write a program on swapping (100, 50)
Why cant I open a file by its explicit path?
Can include files be nested?
What is static and volatile in c?
Explain b+ tree?
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