Friday 18 January 2013

C ++ program to print ABC in Matrix

| |


#include<iostream>

using namespace std;

int main()
{
    char x=65;
    int i,j,n;
    cout<<"Enter the number of rows :""\n";
    cin>>n;
    for(i=0;i<n;i++)
    {
                cout<<"\n";
                for(j=i;j>=0;j--)
                {
                                 cout<<x;
                                 x=x+1;
                                 }
                x=65;
                                }
                cout<<"\n";
     system ("pause");
     return 0;
     }    


C ++ program to print ABC in Matrix


Related Posts Plugin for WordPress, Blogger...
Powered by Blogger.