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
How can you tell whether two strings are the same?
please explain every phase in the "SDLC" in the dotnet.
When can you use a pointer with a function?
What is "Hungarian Notation"?
What is a nested loop?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
What is the difference between fread buffer() and fwrite buffer()?
How to declare pointer variables?
Explain what is wrong with this statement? Myname = ?robin?;
What is a pointer in c plus plus?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
How can I list all of the predefined identifiers?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
What is an auto keyword in c?
Are there constructors in c?