for loop - asterisk tree looping in c++ -


how flip output around smallest largest?

#include <iostream> using namespace std; int main (){     int m, n;     (m=0; m<10; m++) {         (n=0; n<m; n++) cout << " ";         (n=0; n<(19-2*m); n++) cout << "*";         (n=0; n<m; n++) cout << " ";         cout << endl;     }     return 0; } 

just flip it.

#include <iostream> using namespace std; int main (){     int m, n;     (m=9; m>=0; m--) {         (n=0; n<m; n++) cout << " ";         (n=0; n<(19-2*m); n++) cout << "*";         (n=0; n<m; n++) cout << " ";         cout << endl;     }     return 0; } 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -