From 0eb74fdc10f13f36eb2a59471972cd1ad165f063 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 5 Jan 2022 03:47:27 +0000 Subject: [PATCH] refine test use function --- test/helloworld/hello_world.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/helloworld/hello_world.c b/test/helloworld/hello_world.c index 691ffc9..b766624 100644 --- a/test/helloworld/hello_world.c +++ b/test/helloworld/hello_world.c @@ -152,15 +152,11 @@ int printf(const char* format, ...) { // #include -// int add (int a,int b){ -// return (a+b)*(a-b); -// } +int add(int a, int b) { return (a + b) * (a - b); } int main() { printf("Hello RISCV!\n"); - // whisperPrintDecimal(321); - // int a = add(1,23); - // return a; - int a = 3; - return a * a; + int a = add(1, 23); + printf("a:%d\n", a); + return 0; }