#include <iostream.h>
#include <conio.h>
int main ()
{
int mid;
for (int i= 1; i <= 10; i++)
{
cout<< " " ;
mid = (2 * i) - 1;
for (int j =1; j <=(10 - i); j++)
cout<< " " ;
for (j = i; j<= mid; j++)
cout<<( j %10 );
for (j = (mid - 1); j >=i; j--)
cout<<( j %10 );
cout<< endl;
}
return 0;
}
No comments:
Post a Comment
If you have any doubt please let me know