Powered by Blogger.

Search

Wednesday, 3 December 2014

* pattern print




//This programme is tested on visual studio 2012//
#include <iostream>

using namespace std;

void main()

{

unsigned x,y,num;
cout<<"------------------------------------------------------------------------------\n";
cout<<"This programme will print a specific X pattern on entering number than 0 and less than 15\n";
cout<<"------------------------------------------------------------------------------\n";

cout<<"Enter number : ";

cin>>num;

if (num<15)
{
for(x=1;x<=num;x++)
{
cout<<"\nX  ";
for (y=1;y<num;y++)
cout<<"X  ";
}
}
else
cout<<"\nRun the programme again and Enter valid input\n";
cout<<"\n\n------------------------------------------------------------------------------\n";
    cout<<"Thank You for using.\n\nVisit http://bilalzahid22.blogspot.com/ for more\n";
  cout<<"\n------------------------------------------------------------------------------\n";
}

Ditulis Oleh : Unknown // 01:28
Kategori:

0 comments:

Post a Comment

Translate