July 27, 2004 | GPL Compliance for Software Developers | Example executable based on the Library |
/*
Copyright 2004, Your Name Here Copyright 2003, Free Software Foundation
Libtriangle is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ... */
int main (int argc, char **argv) {
int n = atoi (argv [1]); int rows = 1 << n;
int i, j;
for (i = 0; i < rows; i ++) { for (j = 0; j < i; j ++) { printf (" "); } for (j = 0; j < rows; j ++) { if (i & j) printf (" "); else printf ("**"); } printf ("\n"); } }
Next: Works that use the Library Previous Top |
![]() |
Copyright © 2004, Free Software Foundation. Verbatim copying permitted provided this notice is preserved. |