Logo 
Search:

C Programming Articles

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

PROGRAM USNG WHILE LOOP FOR THE FIBONANSI SERIES AS SHOWN IN DESCRIPTION

Posted By: Hooriya Khan     Category: C Programming     Views: 2607

WRITE A PROGRAM USNG WHILE LOOP FOR THE FIBONANSI SERIES.

1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

Code for PROGRAM USNG WHILE LOOP FOR THE FIBONANSI SERIES AS SHOWN IN DESCRIPTION in C Programming

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


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

for(i=1;i<=n;i++)
{
    printf("\n");
    for(j=1;j<=i;j++)
    {
     printf("%3d",i);
    }
}
getch();

}

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

Enter the No :- 7

1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
6 6 6 6 6 6
7 7 7 7 7 7 7

*/
  
Share: 



Hooriya Khan
Hooriya Khan author of PROGRAM USNG WHILE LOOP FOR THE FIBONANSI SERIES AS SHOWN IN DESCRIPTION is from Karachi, Pakistan.
 
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!