C Program to Check Whether a Number is Prime or Not | Prime Number Program in C
ฝัง
- เผยแพร่เมื่อ 28 ก.ย. 2024
- C Program to Check Whether a Number is Prime or Not | Prime Number Program in C | Program to Check Prime Number in C
Subject: C Language (in Hindi)
Topic Name: Program to Check Whether a Number is Prime or Not
📘For More C Programming (Practice Programs)📘
👇Watch The Complete Playlist👇
• C Programs For Practice
💙If YOU THINK our Videos are Helping you Please Support Us by SUBSCRIBING💙
🔔 & Please Like, Comment & Share our Tutorials 🔔
For More information : Call us at : +91- 92696-98122 , 8561089567
Or visit at : www.wscubetech...
~Contact us:-
►Subscribe: bit.ly/wscubech...
► Facebook : / wscubetech.india
► Twitter : / wscube
► Instagram : / wscubetechindia
► LinkedIn : / wscube-tech
► TH-cam : / wscubetechjodhpur
► Website: wscubetech.com
♥️ Thank You ♥️
#Clanguage #PracticePrograms #CProgramming
U deserve a million subs sir....
Feeling sad by seeing your views 😞🥺🥺
What the .... Is Flag..!!!!
Why is this use man...
I never read about this in C ever 😢
Hmm mujhe bhi Jana h
You can use word prime basically this video show if remainder between numbers are zero then you should change value of flag so woh number prime nae hona flag ki value zero hogi then woh prime hona
Sir apne waha break q likhaa?
For more details please visit to apna college
#include
#include
main()
{
Int n,I,output;
Printf("enter a no.");
Scanf("%d",&n);
For(I=2; I
Conio is what ?
It is important to write this!
@@mischieviousgirlif u write conio
I need to right clrscr() under int
And at the end write getch()
thnku sir
Brilliant but you should apply if (n==2) then show prime number but if you used direct this condition how could this condition true for 2 because this changes value of flag to 1 how true for prime
Can you give me solution of this
write a C program that create data structure that are larger than the amount of physical memory contained in their machine
#include
int main()
{
int num,flag=0,i;
printf("ENTER A NUMBER: ");
scanf("%d",&num);
if(num==0 || num==1)
{
flag=1;
}
for(i=2;i
#include
#include
void main()
{
int n, f;
printf("Please enter any number : ");
scanf("%d", &n);
if(n==2 || n==3)
printf("
The number %d is a prime number", n);
else
{
if(n%2==0)
printf("
The number %d is not a prime number", n);
else
{
for(f=3; ; f+=2)
{
if(n%3==0)
{
printf("
The number %d is not a prime number", n);
break;
}
else
{
if(f*f>n)
{
printf("
The number %d is a prime number", n);
break;
}
}
}
}
}
getch();
}
Output:
Please enter any number : 61
The number 61 is a prime number