C-source program for nine-link answer generator

zhaozj2021-02-11  257

#include "stdio.h" Char in; int now = 0; int download = 1; char buf [100] = "*********"; char buf2 [100] = " ......... "

SetNow () {INT i = 0; while (buf [i]! = '*' && buf [i]! = '/ 0') {i ;} now = i; return count

CHANGE (INT POS) {INT I; CHAR B [10]; IF (POS> = 9) Return; IF (BUF [POS] == '*') {BUF [POS] = '.'; strcpy (B, "Removing");} else {buf [pOS] = '*'; strcpy (b, "install");} setNow (); printf ("/ n% s / t% D / T% s% d) Ring ", BUF, JISHU 1, B, POS 1); Printf (" / n "); for (i = 0; i <= now; i ) Printf (" "); Printf (" ^ "); }

Main (int Argc, char * argv []) {Printf ("/ n% s", buf); while (strcmp (buf, buf2)) {change (0); Jishu ; Change (now 1); Jishu ; }

转载请注明原文地址:https://www.9cbs.com/read-3729.html

New Post(0)