- 博客(8)
- 收藏
- 关注
原创 C++ 11.09
1、#include<iostream>using namespace std;int main(){ for (int i = 1; i < 10; i++) { for (int j = 1; j < 10; j++) { if (i >= j) { cout << j<<"*"<<i<<"...
2021-11-09 20:21:31 563
原创 C++ 10.29
1、#include<iostream>using namespace std;int main(){ int a = 2; int b = 95; int c = 85; c = a > b ? a : b; (a > b ? a : b) = 100; cout << a << endl; cout << b << endl; cout << c ...
2021-10-29 19:26:50 94
原创 C++ 10.28
1、#include<iostream>using namespace std;int main(){ int a = 10; int b = 8; cout << a + b << endl; cout << a - b << endl; cout << a * b << endl; cout << a / b << endl; co...
2021-10-28 19:23:01 96
原创 C++ 10.27
1、#include<iostream>using namespace std;int main(){ char ch = 's'; cout << ch << endl; cout << "char所占的内存空间为" << sizeof(char) << endl; cout << (int)ch << endl; system("pause"); re...
2021-10-27 18:49:16 108
原创 C++ 10.26
1、#include<iostream>using namespace std;int main(){ cout << "hello world" << endl; system("pause"); return 0;}2、#include<iostream>using namespace std;int main(){ int a = 10; cout << "a=" <&l...
2021-10-26 19:07:36 134
原创 day 3
单目操作符1、sizeof/strlen#include<stdio.h>int main(){ int arr[] = { 1,2,3,4,5,6 }; printf("%d\n", sizeof(arr)); printf("%d\n", sizeof(arr) / sizeof(arr[0])); return 0;}#include<stdio.h>int main(){ char arr[] = {'1','2'...
2021-07-15 18:05:05 58
原创 day 2
1、字符串(双引号,结束标志)#include<stdio.h>int main(){ char arr1[] = "bit"; char arr2[] = { 'b','i','t' }; char arr3[] = { 'b','i','t','\0' }; printf("%s\n", arr1); printf("%s\n", arr2); printf("%s\n", arr3); printf("%d\n", strle...
2021-07-14 18:04:49 50
原创 day 1
1、hello#include<stdio.h>int main(){printf("I am your sister\n");return 0;}2、数据类型#include<stdio.h>int main(){float weight=46.5;printf("weight=%f\n",weight);return 0;}3、变量#include<stdio.h>int main(){in.
2021-07-07 16:16:11 70
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人