Skip to main content

Check whether a given number is Fibonacci prime or not.

PROCEDURE:-
    1.input an integer n
    2. first check whether it is prime or not
    3. if it prime check whether it is in the Fibonacci series
    4.the above check can be made by generating series and comparing each number with n
    5.if n is found in the series then n is Fibonacci prime
    6.else it is not Fibonacci prime  
CODE:-
#include<stdio.h>
void main(){
int n,i=2,k=0,a,b,i,m;
printf(“enter the number”);
scanf(“%d”,&n);
while(i<=n/2)
{
if(n%i = = 0)
  {
    k=1; break;
  }
i++;
}
if(k!=1)
{
a=0; b=1; i=1; m=n;
while(i<=m)
{
  c=a+b;
   if(m= =c)
    {
     printf(“ %d is Fibonacci prime”,n);    break;
    }
a=b; b=c; i++;
}
if(m!=c)
printf(“%d  Not Fibonacci prime”,n);
}
else
printf(“not prime “);
}
Input:-enter the number  13
Output:- 13 is Fibonacci prime 

Comments

Popular posts from this blog

Future Mouse-Evo Mouse

New evolution of the Mouse. In 1980's round ball mouses are invented, then technology introduced Optical mouses. Now upcoming Mouse is named as Evo mouse . No more movement of your hands on placing a physical mouse,   Your finger is the pointer . You can use this mouse on any Flat Surface and also it requires very little space. This mouse contains a Power button on the top, Mini USb port . It works with the help of bluetooth and input is taken by the sensor. View this Video to know the functionality of   EvoMouse

Hide your IP address with Proxy servers

The most common method to Hide your IP address is to use a PROXY server. Proxy server is a computer network service that provides an indirect connections between other computer networks. By using this proxy sites we can access any website with out revealing our IP address. This is the best method to keep your IP address secure. Here is the free proxy server website link.  http://www.freeproxyserver.ca/     We need to type the URL of such as (www.facebook.com) in the box given in the site, then we can browse it with out providing our IP address

Speed Up Your RAM

Speed up your RAM speed by using this technique... 1. Click  Start button Picture  of the Start button 2. Click  Control Panel 3. Choose  System and Maintenance  and then click  System . 4. In the left pane, click  Advanced system settings . 5.On the Advanced tab, under Performance, click  Settings . 6. Click the Advanced tab, and then, under Virtual memory, choose Change. 7. Click  Custom  to change the Initial size (MB) and Maximum size. See the hot tip above. Remember to choose the drive you would like to use to increase the virtual memory. In most cases it usually your C: Drive. You can set the initial size and maximum size after clicking the Custom size check box.Remember its better to keep the Virtual memory values the same. Also having enough available space is absolutely necessary for your virtual memory and RAM to function properly.  In Windows XP 1.Click Start, and then click  Control Pane...