[ prog / sol / mona ]

prog


Post macros.

31 2020-08-15 10:58

#define loop(s,n,args...) for(int i=s;i<n;i++){args;}
#define array(type,name,args...) type name[] ={args};
#define arrsize(arr) (sizeof(arr)/sizeof(arr[0]))
array(int,arr,1,3,4,6,2,7,9,1,0,-1);
loop(0,arrsize(arr),(arr[i]*=2),(arr[i]>6?printf("%d,",arr[i]):0))

40


VIP:

do not edit these