P1000
# P1000 输出马里奥
#include<iostream>
using namespace std;
int main() {
cout << " ********"<<endl;
cout << " ************" << endl;
**cout** << " ####....#."<< endl;
cout << " #..###.....##...." << endl;
cout << " ###.......###### ### ###"<< endl;
cout << " ........... #...# #...#"<< endl;
cout << " ##*####### #.#.# #.#.#"<< endl;
cout << " ####*******###### #.#.# #.#.#"<< endl;
cout << " ...#***.****.*###.... #...# #...#"<< endl;
cout << " ....**********##..... ### ###"<< endl;
cout << " ....**** *****...."<< endl;
cout << " #### ####"<< endl;
cout << " ###### ######"<< endl;
cout << "##############################################################"<< endl;
cout << "#...#......#.##...#......#.##...#......#.##------------------#"<< endl;
cout << "###########################################------------------#"<< endl;
cout << "#..#....#....##..#....#....##..#....#....#####################"<< endl;
cout << "########################################## #----------#"<< endl;
cout << "#.....#......##.....#......##.....#......# #----------#"<< endl;
cout << "########################################## #----------#"<< endl;
cout << "#.#..#....#..##.#..#....#..##.#..#....#..# #----------#"<< endl;
cout << "########################################## ############"<<endl;
return 0;
}
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
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
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
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
# 数组的运用及for循环批量填充数组
详情请见P1046题解
# 运用数学运算公式的方法 (幂,次方,开跟)
//首先是要用到math.h的库
#include<math.h>
using namespace std;
int main()
{
pow(数字,数字的幂);//这个常用于计算幂,以及开高次根号(注意是高次根号)
sqrt(数字);//开平方根
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
在线编辑 (opens new window)
最近编辑时间: 2024/01/25 20:50:42