Sunday 12 August 2018

Pattern of 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=1;a<=row;a++){
      for(b=a;b>=1;b--){
          cout<<b;
      }
      cout<<endl;
  }
    return 0;
}



No comments:

Post a Comment