注册 登录
编程论坛 C++教室

百思不得姐,求大虾

苍穹之舞 发布于 2017-05-08 15:57, 1575 次点击
这是我在手机上用Learn C++ 做题时遇到的

what is  the output of this code?

  void f(int a){
    for(int i=1; i<=a/2; i++){
      if(a%i==0){
        cout<<i;
      }
     }
    }
 
   int main(){
     f(6);
   }


 
2 回复
#2
yangfrancis2017-05-11 22:26
代码无误
#3
FollowDream2017-05-13 09:07
回复 楼主 苍穹之舞
求某数的所有因数?
1