?? functovr.c
字號:
#include <stdio.h>
#include <time.h>
float add_em(long int a, float b)
{
float result;
result = a + b;
return(result);
}
void main(void)
{
long int i;
float result = 0;
time_t start_time, stop_time;
printf("Working...\n");
time(&start_time);
for (i = 1; i <= 100000L; i++)
result += i;
time(&stop_time);
printf("Using loop %d seconds\n", stop_time - start_time);
printf("Working...\n");
time(&start_time);
for (i = 1; i <= 100000L; i++)
result = add_em(i, result);
time(&stop_time);
printf("Using function %d seconds\n", stop_time - start_time);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -