Homework 4

来源:互联网 发布:淘宝app官方下载6.9 编辑:程序博客网 时间:2024/05/21 07:06
33 17 56 8 95 2233 17 8 56 95 2233 17 8 56 22 9517 33 8 56 22 9517 8 33 56 22 9517 8 33 22 56 958 17 33 22 56 958 17 22 33 56 95
If(insert<arr[0]){    Var temp1, counter, temp2    Temp1=arr[0]    Arr[0]=insert    For(1 to fin+1)    {        temp2=Arr[counter]        Arr[counter]= temp1        Temp1=temp2    }}If(insert>arr[fin]){    Var temp1, counter, temp2    Temp1=arr[fin]    Arr[fin]=insert    For(fin+1 to 1)    {        temp2=Arr[counter]        Arr[counter]= temp1        Temp1=temp2    }}If(insert>arr[0] and insert<arr[fin]){Var counter, temp1, temp2    For( 1 to fin)    {         If(insert> arr[counter] and insert < arr[counter+1])        {            Temp1= Arr[counter]            Arr[counter]=insert            For(counter+1 to fin+1)            {                temp2=Arr[counter]                Arr[counter]= temp1                Temp1=temp2            }            Finish        }    }}

These three data can represent almost all situations, so these three data can be test data.
Gun, my, get, anne

0 0