程式設計高手請進

2022-09-20 17:11:58 字數 718 閱讀 6221

1樓:

不用1維更方便

:var a,b,c,n:integer;

function mun(v,t:integer):integer;

var j1,j2,j3:integer;

begin

j1:=v div100;

j2:=(v-j1*100) div 10;

j3:=v-j1*100-j2*10;

if t=1 then mun:=j1+j2+j3else mun:=j1*j2*j3;

end;

begin

for a:=1 to 3 do

for b:=1 to 9 do

for c:=1 to 9 do

begin

n:=a*100+b*10+c;

if n*3<1000 then

begin

if (mun(n,1)+mun(n*2,1)+mun(n*3,1)=45) and ((mun(n,0)*mun(n*2,0)*mun(n*3,0))=362880) then

writeln(n,' ',n*2,' ',n*3);

end;

end.

不理解的話我再加註釋

2樓:匿名使用者

你去金臺路那兒有一個圖書大廈,那裡有很多計算機的書,其中就有程式設計的,好象是一層,書名是什麼我忘了,去看看吧!

vb程式設計問題,高手請進

重排一下,你那樣寫太沒層次了,看著暈 private sub command1 click dim a 5 定義 a 0 a 5 6個for i 0 to 4 0 4 五次迴圈a i i 1 t i 1 if t 3 then 這有個條件判斷,t 3,也就是i 2的時候才是true print a ...

cc語言程式設計高手請進!幫個忙,C C C語言程式設計高手請進!幫個忙!

我以前做過一個的,你自己拿去改改名字吧 很長的哦 include include include malloc函式需要的標頭檔案 include 巨集assert需要的標頭檔案 struct student 物件結構體 struct student stu 30 int n 10 typedef s...

藏頭詩高手請進,藏頭詩高手請進

湯 藥難痊傾心 慕 金 石怎堪忘前 程 磊 落求得比翼 飛 愛 字傳書倩影 婷 從上到下,從左到右的讀 湯盤孔鼎有述作 金鸞玉軾搖丁冬 磊落光明大丈夫 程塗半是依船上 飛龍閒廄馬數千 婷婷嫋嫋舞精靈 湯盤孔鼎有述作,金天廟下西京道。磊落紫香香亞樹,程途卻上大羅天,飛上鰲頭侍玉皇。婷孫莫學多情客,藏頭...