On Line 9, Why must there be an integer division of current_row and 3? Can anyone elaborate on this concept please?Code:# include <stdio.h> void printTriangle(int num_rows) { int currentRow; int currentStar; for(currentRow = 0; currentRow < num_rows; currentRow++) { for(currentStar = 0; currentStar <= currentRow + (currentRow / 3 ); currentStar++) { printf("*"); } printf("\n"); } } int main() { printTriangle(5); return 0; }



LinkBack URL
About LinkBacks


