코이스터디 모의고사 3

Run Settings
LanguageC
Language Version
Run Command
#include <stdio.h> int main(){ int n; int hab=0; scanf("%d",&n); int i=n; if(n%2==0){ while(1){ if(i>0){ hab=hab+4*i; } else{ break; } i=i-2; } hab=hab+1; } else{ while(1){ if(i>0){ hab=hab+4*i; } else{ break; } i=i-2; } } printf("%d",hab); }
Editor Settings
Theme
Key bindings
Full width
Lines