0
somali.cc's Avatar, Join Date: Aug 2010
Go4Expert Member
wat about the following diagram: ?

pls give some hints to get the following output:

*
*
* *

* * *

* *
*
*
0
virxen's Avatar, Join Date: Nov 2009
Pro contributor
another way is this

Code:
#include <stdio.h>

int main(){
    for (int i=1;i<=5;i++){
        for (int j=1;j<=5;j++){
             if (j<=(5-i)) 
                  printf(" ");
            else
                  printf("*");
        }
        printf("\n");
    }
    getchar();
    return 0;
}