C examples for Statement:for
Use nested loops to produce a pattern
$ $$ $$$ $$$$ $$$$$
#include <stdio.h> int main(void) { for (int i = 1; i < 6; i++) {/*from w w w . jav a 2s . c om*/ for (int j = 1; j <= i; j++) { printf("$"); } printf("\n"); } return 0; }