prime number
C
#include<bits/stdc++.h>
using namespace std;
bool Is_Prime(long long x){
if(x%2==0)return false;
for(int i=3;i*i<=x;i+=2)
if(x%i==0)return false;
return true;
}
int main(){
long long x;
cin>>x;
if(Is_Prime(x))cout<<"Is Prime";
else cout<<"Is not Prime";
}
Also in C:
- Title
- pasar a binario recursivo
- Category
- C
- Title
- c struct
- Category
- C
- Title
- strcat in c
- Category
- C
- Title
- how to use a pointer as a parameter in c
- Category
- C
- Title
- kadane's algorithm
- Category
- C
- Title
- select all file from date powershell
- Category
- C
- Title
- arduino knn
- Category
- C
- Title
- c zero out array
- Category
- C
- Title
- printf("%3d ",XX);
- Category
- C
- Title
- sue murry
- Category
- C
- Title
- version of libgcc
- Category
- C
- Title
- download file by command line windows
- Category
- C
- Title
- change a attribute in dataframe
- Category
- C
- Title
- delete string function in c
- Category
- C
- Title
- get_session` is not available when using TensorFlow 2.0.
- Category
- C
- Title
- arduino digital read
- Category
- C
- Title
- c producer consumer pthread semaphore
- Category
- C
- Title
- maximo comun divisor
- Category
- C
- Title
- how to free a 2d array correctly
- Category
- C
- Title
- factors using recursion
- Category
- C
- Title
- what is stdin in c
- Category
- C
- Title
- curl post request
- Category
- C
- Title
- python web crawler
- Category
- C
- Title
- a enum data type in c
- Category
- C
- Title
- for loop in c
- Category
- C
- Title
- typedef in c
- Category
- C
- Title
- allocate memory c
- Category
- C
- Title
- limit of integer in c
- Category
- C
- Title
- fibonacci in c
- Category
- C
- Title
- pi in c language
- Category
- C
- Title
- c how to define a variable
- Category
- C
- Title
- how to declare 2 d array using malloc
- Category
- C
- Title
- wait function in c
- Category
- C
- Title
- set timezone in debian terminal
- Category
- C
- Title
- atoi c
- Category
- C
- Title
- confirm sweet alert
- Category
- C
- Title
- entete c/c++
- Category
- C
- Title
- change plot line color in matplotlib
- Category
- C
- Title
- convert string to float c
- Category
- C
- Title
- code in c skipping over scanf
- Category
- C
- Title
- infinite loop using while
- Category
- C
- Title
- c bitwise operators
- Category
- C
- Title
- docker logs follow
- Category
- C
- Title
- windeployqt example
- Category
- C
- Title
- How to setup a line length marker in vim
- Category
- C
- Title
- msdos
- Category
- C
- Title
- doubly linked list c
- Category
- C
- Title
- How to pull images from Docker Registry
- Category
- C
- Title
- append to list in c
- Category
- C
- Title
- mongodb delete all documents
- Category
- C
- Title
- múltiplos entre dos numeros en c
- Category
- C
- Title
- v
- Category
- C
- Title
- how to print a file c
- Category
- C
- Title
- link whatsapp to website
- Category
- C
- Title
- C why is is & nit used in scan f fr string
- Category
- C
- Title
- use of matplotlib inline
- Category
- C
- Title
- putting value of struct in runtme
- Category
- C
- Title
- c check if char is number
- Category
- C
- Title
- how to call the tkinter insert command from another class
- Category
- C
- Title
- c list
- Category
- C
- Title
- -> operator
- Category
- C
- Title
- ordenar un vector
- Category
- C
- Title
- remove an element from a set
- Category
- C
- Title
- too few arguments to function in c
- Category
- C
- Title
- write a program to ask the user 8 integer numbers. your program will then move all negative elements of your array to the end of the array without changing the order of positive elements and negative elements
- Category
- C
- Title
- c fill 2d array
- Category
- C
- Title
- c print hello world
- Category
- C
- Title
- switch case c
- Category
- C
- Title
- first person view unity
- Category
- C
- Title
- arduino millis()
- Category
- C
- Title
- reverse function in c
- Category
- C
- Title
- function pointer c
- Category
- C
- Title
- sum of arrays
- Category
- C
- Title
- pangram program in c
- Category
- C
- Title
- arduino digital input pins
- Category
- C
- Title
- how to remove \n from a string c
- Category
- C
- Title
- remove element queue
- Category
- C
- Title
- how to do Employing defensive code in the UI to ensure that the current frame is the most top level window
- Category
- C
- Title
- c concatenate strings
- Category
- C
- Title
- scanf integer
- Category
- C
- Title
- Declaring Variables in C
- Category
- C
- Title
- sustituir un dígito por otro
- Category
- C
- Title
- typedef vs #define
- Category
- C
- Title
- strtok
- Category
- C
- Title
- Switch Mode C Programming
- Category
- C
- Title
- read a document in c getting name from console
- Category
- C
- Title
- c value set to zero __memmove_avx_unaligned_erms
- Category
- C
- Title
- full screen on c
- Category
- C
- Title
- how to go to top of file in vim
- Category
- C
- Title
- Declare macro
- Category
- C
- Title
- c if int
- Category
- C
- Title
- reset style matplotlib
- Category
- C
- Title
- hentai clochette
- Category
- C
- Title
- time now c
- Category
- C
- Title
- how to remove button decoration
- Category
- C
- Title
- heitai bestial
- Category
- C
- Title
- Difference between ** and *
- Category
- C
- Title
- mitch mcconnell
- Category
- C
- Title
- functions return type in c
- Category
- C
- Title
- #include<stdlib.h>
- Category
- C