题目信息
-
题目类型
-
练习
-
题目年份
-
2025
-
题目题型
-
问答题
-
关 键 词
-
程序
题目题干
阅读程序,写出运行结果。ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
#include <iostream>ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
#include <iomanip>ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
using namespace std;ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
const int N = 5;ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
int main()ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
{ int a[N][N]={ 0 }, i, j, k;ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
for( k=1, i=0; i<N; i++ )ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
for( j=i; j>= 0; j--, k++ )ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
a[j][i - j ] = k;ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
for( i=0; i<N; i++ )ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
{ for( j=0; j<N; j++ )ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
cout << setw( 3 ) << a[i][j];ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
cout << endl;ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
}ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
}ZdD100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
答案解析
相关题目
-
以下不能对二维数组a进行正确初始化的语句是( )。 (A)int a[2][3] = { 0 }; (B)int a[][3] = { { 0,1 }, { 0 } }; (C)int a[2]
-
阅读程序,写出运行结果。 #include <iostream> #include <iomanip> using namespace std; const int N = 5
-
以下程序用于输入一个矩阵的元素,并输出指定行的元素。请补充inputAry函数和outputAry函数。 #include<iostream> using namespace std; c
-
有以下说明语句,则调用函数的正确语句是( )。 int x[4][5]; void fun( int y[4][5] , int m, int n); (A)fun(x, 4,5); (B)f
-
有以下说明语句,则调用函数的正确语句是( )。 int b[4][5]; void fun( int * ,int n); (A)fun(b, 20); (B)fun(b[0], 20); (
-
有以下说明语句,则调用函数的正确语句是( )。 int a[10]; void fun( int * ,int n); (A)fun(a, 10); (B)fun(a[0], 10); (C
-
有说明语句:int a[10]; 及函数:int fun(int x[10], int n) { return sizeof(x); } 则语句 cout<<fun(a,10)&l
-
若用数组名作为调用函数的实参,则传递给形参的是( )。 (A)数组存储首地址 (B)数组的第一个元素值 (C)数组中全部元素的值 (D)数组元素的个数
-
阅读程序,写出运行结果。 #include <iostream> using namespace std; int f(int [],int); int main() { int a[]
-
阅读程序,写出运行结果。 #include <iostream> using namespace std; int f( int [][3], int, int ); int main()
提示声明
- 免责声明:本站资源均来自网络或者用户投稿,仅供用于学习和交流:如有侵权联系删除!
- 温馨提示:本文属于积分文章,需要充值获得积分或升级VIP会员,也可在会员中心投稿获取。
猜你喜欢
Scratch3.0
全国青少年软件编程等级考试
Python
Scratch图形化一级
Scratch图形化四级
Scratch图形化三级
Scratch图形化二级
电子学会