Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- //Pre: introduïm un natural
- //Post: retorna una figura de n*n
- int main() {
- int n;
- cin >> n;
- for (int i=n; i != 0; --i) {
- for (int j=i-1; j != 0; --j) cout << '+';
- cout << '/';
- for (int k=i; k != n; ++k) cout << '*';
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement