Start New Discussion within our Software Development Community

{-='Number of Rows using Dev-C LaNGuaGe'=-}

#include<stdio.h>

int main(void)
{
//  Local Declarations
    int numRows;
   
//  Statements
    printf("How many rows do you want to have?");
    scanf("%d", &numRows);
   
    int outerCount;
    for(outerCount = 1; outerCount <= numRows; outerCount++)
      {
          int innerCount;
          for(innerCount = 1; innerCount <= outerCount; innerCount++)
             if(outerCount <= innerCount)
                printf("*");
          
             else
                printf("**");
                printf("\n");                           
      }// for
      
    system("pause");
    return 0;
}// main