求助c++题

求助c++题求大神帮我解答... 求助c++题求大神帮我解答 展开
 我来答
White_MouseYBZ
2016-11-20 · TA获得超过4万个赞
知道大有可为答主
回答量:2.1万
采纳率:82%
帮助的人:7402万
展开全部

一、

  1. 依次填:1   0   10   Index   Term

  2. 6,5,6

  3. 依次填:int score   default

  4. 17

二、

  1. //#include "stdafx.h"//If the vc++6.0, with this line.
    #include <iostream>
    using namespace std;
    int main(void){
    for(int i=1;i<10;i++){
                for(int j=1;j<i;cout << "   ",j++);
                for(j=i;j<10;cout.width(3),cout << i*j++);
                cout << endl;
            }
    return 0;
    }
  2. //#include "stdafx.h"//If the vc++6.0, with this line.
    #include <iostream>
    #include <iomanip>
    using namespace std;
    #define N 12
    int main(void){
        for(int a=1,b=1,m=1;m<=N;b+=a,a=b-a,m++)
             cout << "Month" << setw(2) << m << ": " << (a<<1) << endl;
        return 0;
    }
  3. //#include "stdafx.h"//If the vc++6.0, with this line.
    #include <iostream>
    #include <iomanip>
    using namespace std;
    #define N 12
    int main(void){
        for(int n=0,i=101;i<200;i+=2){
            for(int j=3;j*j<=i;j+=2)
                if(i%j==0)
                    break;
            if(j*j>i){
                cout << setw(4) << i;
                n++;
            }
        }
        cout << endl << "A total of " << n << " prime Numbers." << endl;
        return 0;
    }
  4. //#include "stdafx.h"//If the vc++6.0, with this line.
    #include <iostream>
    #include <iomanip>
    using namespace std;
    int main(void){
        for(int i=6;i<1000;i+=2){
            for(int m=1,t=i>>1,j=2;j<=t;j++)
                if(i%j==0)
                    m+=j;
            if(m==i)
                cout << setw(4) << m << endl;
        }
        return 0;
    }

没事,没分也做……
匿名用户
2016-11-20
展开全部
这么多题目就10个分数,小神都不会帮你做,别说大神。
追问
我就10分,太尴尬了😂
追答
恩,还是自己卖力学吧,技不压身
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式