📄 report.c
字号:
#ifndef DO_REPORT
#define DO_REPORT
#endif
#include <stdio.h>
#include <math.h> // for sqrt
#include "report.h"
#ifndef _LOG
#define _LOG
#endif
#include "log.h"
FILE * reportFP = stdout;
void Report_DoReport(const char * str,int count,double tot,double totsqr)
{
double avg,avgsqr;
avg = tot/count;
avgsqr = totsqr/count;
Log_TeeFile(reportFP);
Log_Printf("%-20s : avg = %2.1f (sdev = %2.1f), tot = %d\n",
str , avg, sqrt(avgsqr - avg*avg), (int)tot );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -