Question : permutation example using nested loop in c
Answered by : ovi
#include <stdio.h> int main() { int a, b, c; for (a = 1; a <= 3; a++) { for (b = 1; b <= 3; b++) { for (c = 1; c <= 3; c++) { printf ("%d, %d, %d\n", a, b, c); } } } return 0; }
Source : http://cpbook.subeen.com/2011/08/loop.html | Last Update : Mon, 03 Oct 22