Change 1 character puzzle 1

Change 1 character puzzle 1


Add or replace at most 1 character in the longest line of the following program so that it will print 20 dots. There are at least 3 solutions.

#include <stdio.h>
int main() {
int i, n = 20; for (i = 0; i < n; i--) putchar('.');
return 0;
}

SPOILER ALERT! Here are 3 solutions:

int i, n = 20; for (i = 0; -i < n; i--) putchar('.');
int i, n = 20; for (i = 0; i < n; n--) putchar('.');
int i, n = 20; for (i = 0; i + n; i--) putchar('.');


visit link download

Popular posts from this blog

IP2Location IP Country ISP Database April 2013 Torrent Download

Change Your IMEI in Android Mobile

Cerpen Evelyn Waugh Penumpang yang Simpatik