#4596: VB---為什麼一直出現CE= =


DpKing719 (BlackTea)


這是我的程式碼

Dim y As Long
Dim x As String

Open Cons For Input As #1

Do While Not EOF(1)
   Input #1, y
   n = 1
   Do Until y = 1
      n = n + 1
      Do Until y Mod n <> 0
         y = y / n
         n2 = n2 + 1
      Loop
      If n2 = 1 Then x = x + CStr(n) + " * "
      If n2 > 1 Then x = x + CStr(n) + "^" + CStr(n2) + " * "
      n2 = 0
   Loop
   Print Mid(x, 1, Len(x) - 2)
   x = ""
Loop

 

請問是哪邊出了問題勒~

謝囉

#4597: Re:VB---為什麼一直出現CE= =


x000032001 (某數)


這是我的程式碼

Dim y As Long
Dim x As String

Open Cons For Input As #1

Do While Not EOF(1)
   Input #1, y
   n = 1
   Do Until y = 1
      n = n + 1
      Do Until y Mod n <> 0
         y = y / n
         n2 = n2 + 1
      Loop
      If n2 = 1 Then x = x + CStr(n) + " * "
      If n2 > 1 Then x = x + CStr(n) + "^" + CStr(n2) + " * "
      n2 = 0
   Loop
   Print Mid(x, 1, Len(x) - 2)
   x = ""
Loop

 

請問是哪邊出了問題勒~

謝囉

1.請上FreeBASIC wiki上找相關函式要include甚麼檔

2. wiki裡有programmer's guide 找不到請找這個

3.請用FB的編譯器

4.快比賽了 寫這個沒啥用(死

#4598: Re:VB---為什麼一直出現CE= =


YogiBear (test)


這是我的程式碼

Dim y As Long
Dim x As String

Open Cons For Input As #1

Do While Not EOF(1)
   Input #1, y
   n = 1
   Do Until y = 1
      n = n + 1
      Do Until y Mod n <> 0
         y = y / n
         n2 = n2 + 1
      Loop
      If n2 = 1 Then x = x + CStr(n) + " * "
      If n2 > 1 Then x = x + CStr(n) + "^" + CStr(n2) + " * "
      n2 = 0
   Loop
   Print Mid(x, 1, Len(x) - 2)
   x = ""
Loop

 

請問是哪邊出了問題勒~

謝囉

1.請上FreeBASIC wiki上找相關函式要include甚麼檔

2. wiki裡有programmer's guide 找不到請找這個

3.請用FB的編譯器

4.快比賽了 寫這個沒啥用(死



請下載 FreeBasic 來練習,不要直接 Copy VB6.0 程式碼

你就會發現 FreeBasic 沒有 CStr 這個函式

這是你 CE 的原因。

 

#4599: Re:VB---為什麼一直出現CE= =


DpKing719 (BlackTea)


這是我的程式碼

Dim y As Long
Dim x As String

Open Cons For Input As #1

Do While Not EOF(1)
   Input #1, y
   n = 1
   Do Until y = 1
      n = n + 1
      Do Until y Mod n <> 0
         y = y / n
         n2 = n2 + 1
      Loop
      If n2 = 1 Then x = x + CStr(n) + " * "
      If n2 > 1 Then x = x + CStr(n) + "^" + CStr(n2) + " * "
      n2 = 0
   Loop
   Print Mid(x, 1, Len(x) - 2)
   x = ""
Loop

 

請問是哪邊出了問題勒~

謝囉

1.請上FreeBASIC wiki上找相關函式要include甚麼檔

2. wiki裡有programmer's guide 找不到請找這個

3.請用FB的編譯器

4.快比賽了 寫這個沒啥用(死

謝謝你囉

比賽見 :)

#4600: Re:VB---為什麼一直出現CE= =


DpKing719 (BlackTea)


這是我的程式碼

Dim y As Long
Dim x As String

Open Cons For Input As #1

Do While Not EOF(1)
   Input #1, y
   n = 1
   Do Until y = 1
      n = n + 1
      Do Until y Mod n <> 0
         y = y / n
         n2 = n2 + 1
      Loop
      If n2 = 1 Then x = x + CStr(n) + " * "
      If n2 > 1 Then x = x + CStr(n) + "^" + CStr(n2) + " * "
      n2 = 0
   Loop
   Print Mid(x, 1, Len(x) - 2)
   x = ""
Loop

 

請問是哪邊出了問題勒~

謝囉

1.請上FreeBASIC wiki上找相關函式要include甚麼檔

2. wiki裡有programmer's guide 找不到請找這個

3.請用FB的編譯器

4.快比賽了 寫這個沒啥用(死



請下載 FreeBasic 來練習,不要直接 Copy VB6.0 程式碼

你就會發現 FreeBasic 沒有 CStr 這個函式

這是你 CE 的原因。

 

嗯嗯

原來是我的版本跟它不同=ˇ=

我以為他的是  VB 6.0

謝謝瞜

#4603: Re:VB---為什麼一直出現CE= =


tallhand (高手)


這是我的程式碼

Dim y As Long
Dim x As String

Open Cons For Input As #1

Do While Not EOF(1)
   Input #1, y
   n = 1
   Do Until y = 1
      n = n + 1
      Do Until y Mod n <> 0
         y = y / n
         n2 = n2 + 1
      Loop
      If n2 = 1 Then x = x + CStr(n) + " * "
      If n2 > 1 Then x = x + CStr(n) + "^" + CStr(n2) + " * "
      n2 = 0
   Loop
   Print Mid(x, 1, Len(x) - 2)
   x = ""
Loop

 

請問是哪邊出了問題勒~

謝囉

1.請上FreeBASIC wiki上找相關函式要include甚麼檔

2. wiki裡有programmer's guide 找不到請找這個

3.請用FB的編譯器

4.快比賽了 寫這個沒啥用(死



請下載 FreeBasic 來練習,不要直接 Copy VB6.0 程式碼

你就會發現 FreeBasic 沒有 CStr 這個函式

這是你 CE 的原因。

 

嗯嗯

原來是我的版本跟它不同=ˇ=

我以為他的是  VB 6.0

謝謝瞜

 

 

ggc上我跟你說 我是TALLHAND