:
C++程式言?
:
如?可以我出程式????? 因一直遇到瓶都不出,~~~ 1. 利用input n算2^n 2. 用C算GCD(3333,456)
最佳解答:
1. int i_will_study_hard_after_this_homework(int n) { if (n==0) return 1; else if (n==1) return 2; else if (n>1) return 2*i_will_study_hard_after_this_homework(n-1); } 2.(相除法) int i_will_study_hard_after_this_homework(int x,int y) { int temp; while (y!=0){ temp = x%y; x=y; y=temp;} return x; } 用GOOGLE!便找都有你要的答案= =

此文章自奇摩知+如有不便留言告知
< async src="/pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
其他解答:CF546184287637C5
文章定位:
人(29) | 回(0)| 推 (0)| 收藏 (0)| 寄
全站分: 工作甘苦(工作心得、、求)