求解算法打出每一行的数字Enter the number of rows:712 34 5 67 8 9 1011 12 13 14 1516 17 18 19 20 2122 23 24 25 26 27 28You can use the following commands: Print ‘n’– prints the content of variable ‘n’.‘n’ can be any v
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/26 08:48:59
求解算法打出每一行的数字Enter the number of rows:712 34 5 67 8 9 1011 12 13 14 1516 17 18 19 20 2122 23 24 25 26 27 28You can use the following commands: Print ‘n’– prints the content of variable ‘n’.‘n’ can be any v
求解算法打出每一行的数字
Enter the number of rows:7
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
22 23 24 25 26 27 28
You can use the following commands:
Print ‘n’– prints the content of variable ‘n’.‘n’ can be any variable.
PrintSpace – prints one space at a time.
GoToNextLine – allows you to go to the next time.
Your algorithm will need to have for loops,one nested into another
求解算法打出每一行的数字Enter the number of rows:712 34 5 67 8 9 1011 12 13 14 1516 17 18 19 20 2122 23 24 25 26 27 28You can use the following commands: Print ‘n’– prints the content of variable ‘n’.‘n’ can be any v
for(int i=1 ;i