Skip to content

Instantly share code, notes, and snippets.

@aadimator
Last active November 2, 2016 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aadimator/29ed4b3ee78458c52f96aafc27d4935c to your computer and use it in GitHub Desktop.
Save aadimator/29ed4b3ee78458c52f96aafc27d4935c to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
using namespace std;
int main(){
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
string output = string(n - i, ' ');
output += string(i, '#');
cout << output << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment