1. Write a Program to take number from user and print summation of first and last Digit c program 
2. Write a Program to find fibonacci series up to n number using for loop c program 
3. Write a program to take number from user check it's number is prime or not prime c program

1.
Write a Program to take number from user and print summation of first and last Digit c program 

/* Write a Program to take number from user and print summation of first and last Digit  */
   #include<stdio.h>
   #include<conio.h>
   void main()
   {
     int i,num,p,t,sum=0;
     clrscr();
     printf("Enter number : ");
     scanf("%d",&num);
     p = num%10;
     while(num>0)
     {
       t = num%10;
       num = num/10;
     }
     sum = p +t;
     printf("Sum of first and last digit = %d",sum);
     getch();
   }   
                    

WProgram to take number from user and print summation of first and last Digit c program - Program Code

WProgram to take number from user and print summation of first and last Digit c program output - Program Code

WProgram to take number from user and print summation of first and last Digit c program output - Program Code

Download Program source code
Download To click here...

2.
Write a Program to find fibonacci series up to n number using for loop c program - Program Code

/* Write a Program to find fibonacci series up to n number using for loop  */
   #include<stdio.h>
   #include<conio.h>
   void main()
   {
     int i,n,t1=0,t2=1,fibo;
     clrscr();
     printf("Enter the number of terms : ");
     scanf("%d",&n);
     printf("Fibonacci series : ");
     for(i=0;i<=n;i++)
     {
       printf("%d,",t1);
       fibo = t1 + t2;
       t1 = t2;
       t2 = fibo;
     }
     getch();
   }              

Program to find fibonacci series up to n number using for loop c program - Program code

Program to find fibonacci series up to n number using for loop c program output - Program code

Program to find fibonacci series up to n number using for loop c program output - Program code

Download Program source code
Download To click here...

3.
Write a program to take number from user check it's number is prime or not prime

/* Write a program to take number from user check it's number is prime or not prime */
   #include<stdio.h>
   #include<conio.h>
   void main()
   {
     int i,n,f=0;
     clrscr();
     printf("Enter Number : ");
     scanf("%d",&n);
     for(i=2;i<n;i++)
     {
       if(n%i==0)
       {
f=1;
break;
       }
     }
     if(f==0)
     {
       printf("%d is prime",n);
     }
     else
     {
       printf("%d is not prime",n);
     }
     getch();
   }

program to take number from user check it's number is prime or not prime c program - Program Code

program to take number from user check it's number is prime or not prime c program - Program Code

program to take number from user check it's number is prime or not prime c program output - Program Code

program to take number from user check it's number is prime or not prime c program output - Program Code

Download Program source code
Download To click here...