Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Collatz(3k+1)
#include <stdio.h> #include <stdlib.h> #include <time.h> int main(void) { unsigned int n; time_t t; srand((unsigned) time(&t)); n = rand() / 3; if (n > 1) { while (n > 1) { printf("%10u \n", n); if ((n % 2) == 0) { n = n / 2; if (n == 1) printf("%10u", n); } else n = 3 * n + 1; } } else printf("%u", n); return 0; }
run
|
edit
|
history
|
help
0
Assignment 10
150115_MatrizTodosDistintos
Sheldon 9 area none aliens as aliens and farms Lockheed Kelly and lame lead district 9
pseudo hw
Partition
la wea afortunada
CPTTRN_1
program
Lab 11 v1.0
Funciones en C