Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

C, 147 145 112 bytes

main(m){char a[99]="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";scanf("%4s%d",a+50,&m);printf("%.3s%s",a+--m*3,a+52);}

Online demo

Thanks ugorenugoren!

C, 147 145 112 bytes

main(m){char a[99]="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";scanf("%4s%d",a+50,&m);printf("%.3s%s",a+--m*3,a+52);}

Online demo

Thanks ugoren!

C, 147 145 112 bytes

main(m){char a[99]="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";scanf("%4s%d",a+50,&m);printf("%.3s%s",a+--m*3,a+52);}

Online demo

Thanks ugoren!

added 57 characters in body
Source Link
Marco
  • 601
  • 4
  • 5

C, 147 145145 112 bytes

#include <stdio.h>
main(m){int m;charchar a[99]="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";scanf("%4s%2d""%4s%d",a+50,&m);a[m--*3]=0;printf;printf("%s%s""%.3s%s",a+m*3a+--m*3,a+52);}

Online demoOnline demo

Thanks ugoren!

C, 147 145 bytes

#include <stdio.h>
main(){int m;char a[99]="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";scanf("%4s%2d",a+50,&m);a[m--*3]=0;printf("%s%s",a+m*3,a+52);}

Online demo

C, 147 145 112 bytes

main(m){char a[99]="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";scanf("%4s%d",a+50,&m);printf("%.3s%s",a+--m*3,a+52);}

Online demo

Thanks ugoren!

a[m*3]=0 and a+(m-1)*3 to a[m--*3]=0 and a+m*3
Source Link
Marco
  • 601
  • 4
  • 5

C, 147147 145 bytes

#include <stdio.h>
main(){int m;char a[99]="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";scanf("%4s%2d",a+50,&m);a[m*3]=0;printf;a[m--*3]=0;printf("%s%s",a+(m-1)*3a+m*3,a+52);}

Online demo

C, 147 bytes

#include <stdio.h>
main(){int m;char a[99]="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";scanf("%4s%2d",a+50,&m);a[m*3]=0;printf("%s%s",a+(m-1)*3,a+52);}

C, 147 145 bytes

#include <stdio.h>
main(){int m;char a[99]="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";scanf("%4s%2d",a+50,&m);a[m--*3]=0;printf("%s%s",a+m*3,a+52);}

Online demo

Source Link
Marco
  • 601
  • 4
  • 5
Loading