View Code of Problem 18

#include<stdio.h>
int main(){
	int n;
	int count = 0,i;
	while(scanf("%d",&n)!=EOF){
		count =0;
		for(i = 1;i <= n; i++){
		count = count + (i+1)/2-1;}
		printf("%d\n",count);
	}

	 return 0;
}

Double click to view unformatted code.


Back to problem 18