自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 第三次上机 第三题

#include<iostream>#include<string>#include<ctype.h>using namespace std;bool huiwen(string s) { int j = 0; for (int i = 0, j = s.size() - 1; i < j; i++, j--) { while (isalnum(s[i]) == false && i < j) i++; while (is

2020-12-13 22:01:45 100

原创 第三次上机 第二题

#include <iostream>using namespace std;int main() { int arr[3][3] = { {1,2,3,},{2,3,4,},{3,4,5,}}; int(*p) = *arr; int up_sum = 0, down_sum = 0, djx = 0; int a = 0, b=2; for (;a < 3;++a,b=2) { for (;a==0&&b >-1;--b) up_sum

2020-12-13 21:59:47 72

原创 第三次上机 第一题

#include<iostream>using namespace std;int main(){ int arr[5][5]{ {1,2,3,4,5}, {2,3,4,5,6}, {3,4,5,6,7}, {1,1,1,1,1}, {2,2,2,2,2} }; int arr2[5]; for (int i = 0; i < 5; i++) { int sum = 0; for (int j = 0; j < 5; j++) {

2020-12-13 21:54:29 60

原创 2020-11-13第七题

#include <iostream>using namespace std;int main() { int radius=1; double area=0.0; while (1) { area = 3.14 * radius * radius; if (area <= 100) cout << "半径为"<<radius<<"的面积为:"<<area << endl; else br

2020-11-13 20:36:45 417

原创 2020-11-13第六题

#include <iostream>using namespace std;int main() { double a,b=0,n,sum=0; for (n = 1; n < 11; ++n) { cout << "请输入第" << n << "个数:" << endl; cin >> a; if (a > 0) { ++b; sum = sum + a;

2020-11-13 20:21:03 80

原创 2020-11-13第五题

#include <iostream>using namespace std;int main(){ int a, b, n; for (b = 1; b < 5; ++b) { for (a = b, n = 1; n < 6; a = a + b, ++n) { cout << a << '\t'; } cout << '\n'; } return 0;}

2020-11-13 20:11:27 89

原创 2020-11-13第四题

#include<iostream>using namespace std;int main(){ int N, sum, i; while (1) { cout << "请输入一个自然数N:"; cin >> N; if (N >= 0) { for (i = 1, sum = 0; i <= N; ++i) sum = sum + i; cout << "结果为" << sum <&

2020-11-13 20:08:18 271

原创 2020-11-13第三题

#include<iostream>using namespace std;int main() { int a, b, c, num; for (num = 100; num < 1000; ++num) { a = num / 100, b = (num - 100 * a) / 10, c = num - 100 * a - 10 * b; if (num == a * a * a + b * b * b + c * c * c) cout <<

2020-11-13 20:05:34 68

原创 2020-11-13第二题

#include<iostream>#include<cmath>using namespace std;int main() { double a, b, c, p, S; cout << "输入三边:"; cin >> a >> b >> c; if (a > 0 && b > 0 && c > 0&&a+b>c&&a+c>b

2020-11-13 20:01:27 80

原创 2020-11-13第一题

在这里插入代码片#include <iostream>using namespace std;int main(){ int num1, num2, num3; int max, min; cout << "请输入三个实数:\n"; cin >> num1 >> num2 >> num3; if (num1 > num2) { max = num1; min = num2; } else { max = nu

2020-11-13 19:51:54 64

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除