Skip to content

aryan5682/C-programming

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C-programming

// program to check whether the entered number is a prime number or not.

#include <stdio.h> int main() { int i,num,prime=1; printf("Enter the value of num:"); scanf("%d",&num); for(i=2;i<num;i++){ if(num%i==0){ prime=0; break; } } if(prime==0) { printf("It is not a prime number."); //condition for prime number checking... } else{ printf("It is a prime number."); }

return 0;

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 100.0%