Program In C Language To Create A Fibonacci Series And Leap Year

1.Fibonacci number program in C initial 10 number

#include<stdio.h>
#include<conio.h>
void main()
{
int a=1,b=0;
int f=1;
printf("%d%d",a,b);
while(f<=10);
{
c=a+b;
printf ("%d\n",c);
f++;
a=b;
b=c;
}
getch();
}

2. Calculate leap year with the help of C program


#include<stdio.h>
#include<conio.h>
void main ()

{
int year;
printf("Enter any number");
scanf("%d",year);
if ((year%400==0)||(year%100!=0&&year%4==0))
printf("\n%d Is a leap year",year);
else
printf("\n%d Is not a leap year",year);
getch();
}



Comments

Popular posts from this blog

How To Hack Wifi | Hack Wifi Password | TECH WORTH MIND

Remove Tools From Termux | How can I reopen the installed tool in termux? | TECH WORTHY MIND