#4559: 為什麼輸出時都會多一個"普通"


a85114060 (さんかれあ)


dim m as integer
dim d as integer
這筆資料得回傳質如下:

 *** 第 1 點 (10%):OLE ((line:2))
您的輸出超過測資的輸出!!(line:2)
您額外輸出了: 普通

可能的原因為
* 累贅的輸出,請勿輸出題目未要求的文字

10筆都這樣

請幫忙解答一下

dim s as integer
open cons for input as #1
while not EOF(1)
   input #1,m,d
   s=(m*2+d) mod 3
   if s=1 then
      print "吉"
   elseif s=2 then
      print "大吉"
   elseif s=0 then
      print "普通"
   end if
wend

#4560: Re:為什麼輸出時都會多一個


YogiBear (test)


dim m as integer
dim d as integer
這筆資料得回傳質如下:

 *** 第 1 點 (10%):OLE ((line:2))
您的輸出超過測資的輸出!!(line:2)
您額外輸出了: 普通

可能的原因為
* 累贅的輸出,請勿輸出題目未要求的文字

10筆都這樣

請幫忙解答一下

dim s as integer
open cons for input as #1
while not EOF(1)
   input #1,m,d
   s=(m*2+d) mod 3
   if s=1 then
      print "吉"
   elseif s=2 then
      print "大吉"
   elseif s=0 then
      print "普通"
   end if
wend

 

我分享一下的讀檔方式

Dim s as String

Open Cons For Input as #1

Do
 
    Line Input #1, s
 
    If Trim(s) <> "" Then
       
        Your Code Here ...
       
    End if

Loop Until Eof(1)