當前位置:編程學習大全網 - 電腦編程 - 最簡單的編程

最簡單的編程

把十個數放在數組nums()中

Dim nums(9) as Integer,max as Integer,i as Integer

max=nums(0)

For i=1 to 9

If nums(i)>max then max=nums(i)

next i

Print max

把十個數放在數組nums[]中

#include "iostream.h"

int nums[9],i,max=nums[0];

for(i=1,i<=9,i++)

{

if(nums[i]>max)

max=nums[i];

}

cout<<max;

直接寫的代碼,沒經過測試呢,不好意思哈

  • 上一篇:學習mapinfo basic都需要什麽樣的基礎!
  • 下一篇:flash中壹個有內部動畫的圖形元件,我想把這個內部動畫變形得有點透視的感覺,應該怎麽做
  • copyright 2024編程學習大全網