Thursday 9 January 2014

HOW TO PERFORM BELOW PETTERN IN C

                1
               22
             333
           4444
         55555
       666666
     7777777
   88888888
 999999999
---------------------------------------------------------------------------------------------------------
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
for(a=1;a<=9;a++)
{
  for(b=1;b<=a;b++)
  {
  printf("%d",a);
  }
  printf("\n");
}
getch();
}

No comments:

Post a Comment

How to change Background color by selecting color from Listview

activitymain.xml file::> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xm...