Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

PROGRAM USNG WHILE LOOP FOR THE FIBONANSI SERIES IN TRIANGLE SERIES

Posted By: Pedro Gilbert     Category: C Programming     Views: 4282

WRITE A PROGRAM USNG WHILE LOOP FOR THE FIBONANSI SERIES.

___1
__2 2
_3 3 3
4 4 4 4

Code for PROGRAM USNG WHILE LOOP FOR THE FIBONANSI SERIES IN TRIANGLE SERIES in C Programming


#include <stdio.h>
#include <conio.h>
#include<math.h>


void main()
{
int n,i,j,m,k;
clrscr();
printf("Enter the No :- ");
scanf("%d",&n);

m=n;
for(i=1;i<=n;i++)
{
    printf("\n\t");
    for(k=1;k<=m;k++)
    {
    printf(" ");
    }
    for(j=1;j<=i;j++)
    {
     printf("%2d",i);
    }


    m--;
}
getch();

}

/*
********
OUTPUT
********

Enter the No :- 6


1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
6 6 6 6 6 6
*/
  
Share: 



Pedro Gilbert
Pedro Gilbert author of PROGRAM USNG WHILE LOOP FOR THE FIBONANSI SERIES IN TRIANGLE SERIES is from Dallas, United States. Pedro Gilbert says

I am Pedro Gilbert from Dallas, United States. I work for At&T.

 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!