From c8246d98f5d5a9a666e247c8dad25b108343b78c Mon Sep 17 00:00:00 2001 From: stivenkingsberg Date: Fri, 29 Dec 2023 15:18:20 +0800 Subject: [PATCH] =?UTF-8?q?01-=E6=A3=80=E6=9F=A5return=E5=90=8E=E9=9D=A2?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=9C=89=E7=BC=96=E8=AF=91=EF=BC=9B02-?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=90=8C=E5=90=8D=E5=85=A8=E5=B1=80=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=92=8C=E5=B1=80=E9=83=A8=E5=8F=98=E9=87=8F=E4=BD=9C?= =?UTF-8?q?=E7=94=A8=E5=9F=9F=EF=BC=9B03-=E6=A3=80=E6=9F=A5=E6=9C=AA?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=8F=98=E9=87=8F=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Student/task3/test_stu/01_return.out | 1 + Student/task3/test_stu/01_return.sy | 6 ++++++ Student/task3/test_stu/02_var_defn.out | 1 + Student/task3/test_stu/02_var_defn.sy | 8 ++++++++ Student/task3/test_stu/03_arr_defn.out | 1 + Student/task3/test_stu/03_arr_defn.sy | 4 ++++ 6 files changed, 21 insertions(+) create mode 100644 Student/task3/test_stu/01_return.out create mode 100644 Student/task3/test_stu/01_return.sy create mode 100644 Student/task3/test_stu/02_var_defn.out create mode 100644 Student/task3/test_stu/02_var_defn.sy create mode 100644 Student/task3/test_stu/03_arr_defn.out create mode 100644 Student/task3/test_stu/03_arr_defn.sy diff --git a/Student/task3/test_stu/01_return.out b/Student/task3/test_stu/01_return.out new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Student/task3/test_stu/01_return.out @@ -0,0 +1 @@ +0 diff --git a/Student/task3/test_stu/01_return.sy b/Student/task3/test_stu/01_return.sy new file mode 100644 index 0000000..9bf1b64 --- /dev/null +++ b/Student/task3/test_stu/01_return.sy @@ -0,0 +1,6 @@ +int main(){ + float c = 0.0; + return c; + int a = 1; + return a; +} diff --git a/Student/task3/test_stu/02_var_defn.out b/Student/task3/test_stu/02_var_defn.out new file mode 100644 index 0000000..f04c001 --- /dev/null +++ b/Student/task3/test_stu/02_var_defn.out @@ -0,0 +1 @@ +29 diff --git a/Student/task3/test_stu/02_var_defn.sy b/Student/task3/test_stu/02_var_defn.sy new file mode 100644 index 0000000..92b2d8e --- /dev/null +++ b/Student/task3/test_stu/02_var_defn.sy @@ -0,0 +1,8 @@ +int a = 5; +int b; +int main(){ + int a=10; + b=5; + int c=a*2+b*1.1+3.6; + return c; +} \ No newline at end of file diff --git a/Student/task3/test_stu/03_arr_defn.out b/Student/task3/test_stu/03_arr_defn.out new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Student/task3/test_stu/03_arr_defn.out @@ -0,0 +1 @@ +0 diff --git a/Student/task3/test_stu/03_arr_defn.sy b/Student/task3/test_stu/03_arr_defn.sy new file mode 100644 index 0000000..498ddad --- /dev/null +++ b/Student/task3/test_stu/03_arr_defn.sy @@ -0,0 +1,4 @@ +int a[10]; +int main(){ + return a[0]; +}