这是书上一作业题,10个元素的数组排序,按降序排列,小弟也不会VF,将就写了个,不知对否,还望大虾们指正!!

解决方案 »

  1.   

    set talk off
    clear all
    clear
    dimension x(10)
      for i=1 to 10 
        @ 10,10 say "请输入x(",i,"的值:" get x(i)
       read
      end for
    =asort(x,1)
      for i=1 to 10
        ? "x(",i,")=",x(i)
      endfor
    set talk on
    cancel
      

  2.   


      for i=1 to 10
        ? "x(",i,")=",x(i)
    等于没写啊?没有排序啊
      

  3.   

    第一种,最笨一种,两层循环,每层10次
    for i=1 to 10 
      for j=0 to 10
        if  dimension x(i)>x(j)
            互换
      

  4.   

    asort就是排续函数啊,大哥些!!
      

  5.   

    呵呵,没看清楼主的要求,主要看语法啊
    语法应该没什么错
    set talk on
    cancel???是否应改为return