Sunday 12 August 2018

Pattern of mirror right angle triangle ,right angled from left side using C++

Triangle angle triangle pattern  



You must aware of basic concept of loop.



#include <iostream>
using namespace std;

int main() {
  int a,b,row;
  cout<<"Enter number of row"<<endl;
  cin>>row;
  for(a=row;a>0;a--){
      for(b=a;b>=1;b--){
          cout<<b;
      }
      cout<<endl;
  }
  for(a=2;a<=row;a++){
       for(b=a;b>=1;b--){
          cout<<b;
      }
      cout<<endl;
  }
    return 0;
}



2 comments: