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
When should you use a type cast?
What is the scope of global variable in c?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
How can this be legal c?
What will the preprocessor do for a program?
What is pointer to pointer in c?
Explain the bubble sort algorithm.
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
How do you declare a variable that will hold string values?
What is volatile, register definition in C
Why dont c comments nest?
Explain what is a pragma?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
What are the different types of linkage exist in c?
What is wrong in this statement?