Enter the value of integer n. Print the figure as shown below.(3) Sample input 5 Sample output ***** **** *** ** *
#include <iostream>
int main() {
int n;
std::cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n - i; j++) {
std::cout << "*";
}
std::cout << std::endl;
}
return 0;
}