重构:规范代码格式,拆分 add() 声明与实现

This commit is contained in:
2026-11-16 15:19:41 +08:00
parent 872598f1b1
commit 200e43c18f
5 changed files with 43 additions and 13 deletions
+10 -4
View File
@@ -1,9 +1,15 @@
#include <stdio.h>
int main() {
printf("Hell0 World!");
return 0 ;
#include "add.h"
int main(void)
{
int a = 10;
int b = 20;
int sum = add(a, b);
printf("Hello World!\n");
printf("%d + %d = %d\n", a, b, sum);
}
return 0;
}