Prime Number or Not | C Programming Examples Malayalam Tutorial |

preview_player
Показать описание
Prime Number or Not | C Programming Examples Malayalam Tutorial |

Рекомендации по теме
Комментарии
Автор

what if user enter 1 it will regongnise it as prime number
#include <stdio.h>
void main(){
int num, flag=0;
printf("Enter a number : ");
scanf("%d", &num);
if (num <= 1){
printf("%d is not a prime number\n", num);
}
else{ for (int i=2; i<num; i++){
if (num%i==0) {
flag = 1;
break;
}

}

if (flag==0){
printf("%d is a prime number\n", num);

}
else{
printf("%d is not a prime number\n", num);
}
}
}

adilhashmi
Автор

Sir 5 an input kodukkunnenki 5%5 mod 0 alle???
Appo athengane ee program il seri akum?

abhiramak
Автор

Prime numbers between a given range. ( 7 11 13 17 19 23…..) yengana ahnn sir???

joeljoy
Автор

2 mod 2 == 0 allee so engna ahnu 2 oru prime number avunnath

stinggaming
Автор

Sir, ee same code il 27, 77, okkae prime number aai kaanikknnu

dinilmohan
Автор

nice explanation...expecting more videos.

shebyshejoor
Автор

Prime enna variable inte avishyam undo

anandhus