1樓:聽不清啊
local n ,i
n = 5
for i=1 to n
@ i ,n-i say replicate([*] ,n)endfor
2樓:★和平海
兩種bai方法:
第一種(具有du通用性,修zhi
改迴圈次數dao可列印不同圖案回
)clear
for i=1 to 5
??space(6-i)
for j=1 to 6
??"*"
endfor
?''endfor
第二種,比較簡單:答
for i=0 to 5
?space(5-i)+replicate('*',6)endfor
使用vfp程式設計輸出如下*星形圖案。如何編寫?
3樓:匿名使用者
for i=1 to 4
??space(8-2*i)
for j=1 to 2*i-1
?? "* "
endfor
? endfor
4樓:匿名使用者
for i=1 to 4
??space(7-(i*2-1)) &&左側空格for j=1 to 2*i-1
?? "*"+" " && "*"+" "
endfor
? && 換行專屬endfor
5樓:聽不清啊
贊同wjp456789的回答
程式設計輸出以下圖形 * *** ***** ***
6樓:匿名使用者
public function diamond(byval num as integer) as string
dim i, j as integer, st as string = ""
if (num mod 2 = 0) thenreturn ""
end if
'輸出上三角形
for i = 1 to (num + 1) \ 2for j = 1 to (num + 1) / 2 - ist = st & " "
next
for j = 1 to 2 * i - 1st = st & "*"
next
st = st & vbcrlf
next
'輸出下三角形
for i = 1 to (num - 1) \ 2for j = 1 to i
st = st & " "
next
for j = 1 to num - 2 * ist = st & "*"
next
st = st & vbcrlf
next
return st
end function
private sub button7_click(byval sender as system.object, byval e as system.eventargs) handles button7.
click
dim str as string = ""
str = diamond(7)
textbox6.text = str
end sub
7樓:聽不清啊
#include
int main()
for(i=n-2;i>=0;i--)
return 0;}
8樓:兄弟連教育北京總校
#define line 10 /*控制顯示的行*/
#define row 20 /*控制顯示的列*/void paintstar(int y, int x, int num)
main()
;row = row;
for(line=0; line<7; line++)}
VFP程式設計,VFP程式設計
1 a 2 a 3 b 4 a 5 a 市 d 京 6 c 7 a 8 d 9 c 10 a 二 1 modi comm prg do prg 2 資料庫表和自由表 3 pjx scx 4 go go 1,go top go bottom skip skip skip 1,skip 1 5 順序 選...
VFP程式設計序
1vfp程式設計序。編一個程式要求從鍵盤輸入一個證書,判斷其是否被3整除,如果能,則顯示 該數是三的倍數 否則,顯示 該數不能被三整除 clea n 0 4,20 say 輸入一個整數 get n picture 99999999 read if mod n,3 0 6,24 say 該數是三的倍數...
VFP程式如何編寫,什麼是VFP程式設計
1 建立一個表單1 2 在表單1的資料環境中加入表1 3 在表單中新增控制元件text1文字框,作為使用者輸入要查詢的條件。4 新增command1命令按鈕,caption屬性為 查詢 5 command1的click事件中加入以下 sele from 表1 where 欄位1 這裡可以舉一反三,我...