#include <stdio.h>
void writefile(float);

void main()
{
float currenttemp;
int i;
	for(i=0;i<10;i++)
	{
	printf("Please enter the current temperature:");
	scanf("%f",&currenttemp);
	writefile(currenttemp);
	}

}

void writefile(float thetemp)
{
FILE *fp;
fp=fopen("mytemps.txt","a");  //append to text file
fprintf(fp,"%.2f ",thetemp);
fclose(fp);
}