回複:A C++ interview question

來源: 上中下 2007-07-17 22:16:54 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (370 bytes)
void (int X)
{
int i, j, count;
if x<=0, print "X should be more than 1", return 1;
if x=1 || x=2, print"%d x" return 1;

for( i=0; i count=1;
for (j=2;i-1,j++)
if round i/j=0, i=i-1, count=0;
if count=1, print"%d x";
};
};
return 1;

}

Check the grammar and compile it. it should work.

所有跟帖: 

"if round i/j=0, i=i-1, count=0;" 這裏遞減i的值是不對的 -MGM- 給 MGM 發送悄悄話 (0 bytes) () 07/17/2007 postreply 22:50:12

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”