-Fibonacci program -Program to find the given num is Even or odd. |
|
-Program to find the given num is Prime r not.
#include<stdio.h>
int main()
{
int num, count=0, i;
printf("Enter the Number : ");
scanf("%d", &num);
for(i=1; i<=num; i++)
{
if(num % i == 0)
{
count++;
}
}
if(count == 2)
{
printf(" The Number is Prime ");
}
else
{
printf(" The Number is Not Prime");
}
return 0;
}
-Program to print the given num in Reverse order.
#include<stdio.h>
main()
{
int n,mod,rev=0;
print("Enter the number:");
scanf("%d",&n);
while(n>0)
{
mod=n%10;
rev=(rev*10)+mod;
n=n/10;
}
printf("The number in reverse order is...%d\n",rev);
}
Output:
Enter the number:123456
The number in reverse order is...654321.
- AREA & CIRCUMFERENCE #include<stdio.h> int main() Output: Enter the radius of the circle:5
#include<stdio.h> Output: Enter the Celcius value...8
#include<stdio.h> Output: Enter the year: 2008 Enter the year: 2010 | -FACTORIAL NUMBER OF GIVEN NUMBER #include<stdio.h> Output: Enter the number:5
#include<stdio.h> Output: |
01 - Thuli Thuli - Haricharan, Tanvi.mp3
Home >>