精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • 編寫程序,計算下面4*4二維數(shù)組的兩條對角線上的元素之和

    編寫程序,計算下面4*4二維數(shù)組的兩條對角線上的元素之和
    45 30 26 48
    55 20 17 39
    41 25 19 22
    31 18 22 10
    搞錯區(qū)了,我想問VB
    其他人氣:538 ℃時間:2020-02-05 06:20:18
    優(yōu)質解答
    #include
    int main()
    {
    int i,j,sum;
    int angs[4][4];
    printf("請輸入矩陣:\n");
    sum = 0;
    for(i = 0; i < 4; i++)
    for(j = 0; j < 4; j++)
    {
    scanf("%d",&angs[i][j]);
    if(i == j || i+j == 3)
    sum += angs[i][j];
    }
    printf("%d\n",sum);
    return 0;
    }
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點,以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機版