Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
la wea afortunada
//gcc 5.4.0 #include <stdio.h> #include <stdlib.h> #define MAX 100000 typedef struct posibleafortunado{ int n; char num[MAX]; }posibleafortunado; int main(void) { int j,cont1,cont2; posibleafortunado a; do{ scanf("%d",&a.n); if(a.n==0)break; for(j=0;j<a.n;j++){ a.num[j]='0'; } cont1=2; cont2=a.n; while(cont1<cont2){ for(j=0;j<a.n;j=j+cont1){ } a.num[j]='1'; cont2--; } cont1++; } printf("\n%d:",a.n); for(j=a.n-1;j>=0;j--){ if(a.num[j]=='0'){ printf("%d ",j+1); } } }while(a.n!=0); return 0; }
run
|
edit
|
history
|
help
0
Replacing Evens and Odd with ones and zeroes in a 3-Dimensional array
recursive
Sunday assignment v2
B_141121_fibonacci
main.c
dcl
Spring 2017 Lab 5 v1
printf
Media de 3 numeros
bitmask shift