实验四 函数与异常处理编程

实验任务一

        task1

        源代码

        View Code

        运行截图

        

        函数名(line1)、参数(line3、7、11),其中line7为自定义函数inc内参数

实验任务二

        task2_1

        源代码

        View Code

        运行截图

        

        task2_2

       源代码

       View Code

       运行截图

       

       由源代码task2_1可得,reserve的传递方式必然使用关键字传递

       task2_3

       源代码

       View Code

      运行截图  

      

实验任务三

      task3

      源代码

       View Code

      运行截图

       

实验任务四

        task4

        源代码

        View Code

        运行截图

        

实验任务五

        task5

        源代码

        View Code

        运行截图

        

实验任务六

        task6

        源代码

        View Code

         运行截图

         

实验任务七

        task7

        源代码

        View Code

        运行截图

        

实验任务八

        task8

        源代码

        View Code

        运行截图

        

 

 

 

 

 

  

 

posted @ 2023-05-22 20:44  娄泽涛  阅读(15)  评论(0)    收藏  举报