Created
June 23, 2022 07:40
-
-
Save RoganDawes/fbebb440b4e6d9a4e0ed3e7a0fa913f7 to your computer and use it in GitHub Desktop.
C code implementing Singe's Fear Uncertainty and Doubt protocol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int i, n, m ; | |
scanf("%d", &n); | |
int o = n; | |
while ( n - o < 999999999 ) { | |
char c = '2'; | |
if ((n%3) == 0) { | |
c = '0'; | |
} else if ((n%5) == 0) { | |
c = '1'; | |
} else { | |
i = n; | |
while (i) { | |
m = i % 10; | |
if (m == 3) { | |
c = '0'; | |
break; | |
} else if (m == 5) { | |
c = '1'; | |
// break; | |
} | |
i /= 10; | |
} | |
} | |
putchar(c); | |
n++; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment