{-='Number of Rows (Reverse) using Dev-C LaNGuaGe'=-}
Number of Rows (Reverse)
#include <stdio.h>
int main(void)
{
// Local Declarations
int numRows;
int outerCount;
// Statements
printf("How many rows do you want to have?");
scanf("%d", &numRows);
for(outerCount = 1; outerCount <= numRows; outerCount++)
{
int innerCount;
for(innerCount=1; innerCount<=numRows; innerCount++)
if(outerCount<=innerCount)
if(outerCount>=innerCount)
printf("*");
else
printf("**");
} // for
system("pause");
return 0;
}// main
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.