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