Submission #122696


Source Code Expand

Copy
#include<stdio.h>
#include<float.h>


int task=0;
double	salary=0;

int main(){
	scanf("%d",&task);

	for(double i=1;i<=task;i++)
	{
		salary +=(i*10000)/task;
	}

	printf("%f\n",salary);
		return 0;
}

Submission Info

Submission Time
Task A - AtCoder社の給料
User itukorobu
Language C (GCC 4.4.7)
Score 0
Code Size 220 Byte
Status CE

Compile Error

./Main.c: In function ‘main’:
./Main.c:11: error: ‘for’ loop initial declarations are only allowed in C99 mode
./Main.c:11: note: use option -std=c99 or -std=gnu99 to compile your code
./Main.c:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result