Find the output of the following code :-
class Solution{
public:
void printTriangle(int n) { // n = 5
for(int i = n; i0; i--){
for(int j = 1; j=i; j++){
cout"* ";
}
coutendl;
}
}
};

Posted on by