Prime number program in c using if else

Prime number program in c using if else  Prime number program in c using if else: #include <stdio.h> int main() {     int i, j, flag = 0;     printf("Enter the Number: ");     scanf("%d", &i);     for(j = 2; j <= i/2; ++j)     {         if(i%j...
Share:

Prime number program in c using do-while loop

Prime number program in c using do-while loop  Prime number program in c using do-while loop: #include<stdio.h> int main() {     int i,j,k;     printf("Enter a number: ");     scanf("%d",&i);     k=0;     j=2;     do     {         if(i%j...
Share:

Factorial Program in Java with examples.

Factorial Program in Java and Examples (adsbygoogle = window.adsbygoogle || []).push({}); Factorial:  Factorials are products of every whole number from 1 to n Factorials are introduced in algebra. The value of 0! is 1, according to the convention for an empty product. The notation n! was introduced...
Share:

Prime Number Program in C using For loop

Prime Number Program in C using For loop Prime number program to print from 1 to 100. C program to print numbers from 1 to 100: #include<stdio.h> int main() {   int limit = 100;     printf("Prime numbers between 1 and 100 are: ");     for(int i = 2; i < limit; i++)     {   ...
Share:

Ads

Search This Blog

  • ()
Powered by Blogger.

Strings in C With Syntax, C String Program with output

Strings in C :  Strings can be defined as the one-dimensional array of characters terminated by a null ('\0'). The difference betwee...