Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
finding 3 ones in a row
//gcc 5.4.0 #include <stdio.h> int main(void) { int temp = 0; int counter = 0; unsigned int x = 1011101101; while (x != 0) { temp = x % 10; x /= 10; if (temp == 1 && counter != 3) { counter++; } else if (temp == 0) { counter = 0; } if (counter == 3) { printf("returning 1"); return 1; } } printf("returning 0"); return 0; }
run
|
edit
|
history
|
help
0
get the repeated max
Lab 9 v0.95
signaling NaN test
++i vs i++
Minus pointer
shapes and such
Stub Program for Problem 2 HW 2
Spring 2017 Project 2 v.02
SAI_1-4.c
5 trabajo semanal 4