摘要:
1 #include 2 using namespace std; 3 #include //动态数组 4 #include //算法 5 6 void PrintVector(int v) { 7 cout v; //定义一个容器 指定存放的元素类型 18 v.push_back(10); //把元素放入容器尾部 19 v.push_back(3... 阅读全文
摘要:
A(n) = ∫ sinⁿx dx= ∫ sinⁿ⁻¹xsinx dx= - ∫ sinⁿ⁻¹x d(cosx)= - sinⁿ⁻¹xcosx + ∫ cosx • d(sinⁿ⁻¹)= - sinⁿ⁻¹xcosx + (n - 1)∫ cosx • sinⁿ⁻²x • cosx dx= - sin 阅读全文
摘要:
void updatePhonenum(contacts student[], int n) { char sName[100]; char c; int k = 0; int t = 0; int j = 0; cout << "请输入你要修改手机号的人的名字" << endl; do { cin 阅读全文
摘要:
void fileOutput(contacts student[] , int n){ ofstream out ; out . open("tongxunlu-new.txt") ; for(int i = 0 ; i<= n-1 ; i++){ out << "学号" << '\t' <<'\ 阅读全文
摘要:
自定义错误类型 自行错误抛出 函数中的变长参数 不定长形参的应用 错误处理 五、python所有的标准异常类: 阅读全文
摘要:
结构体的定义 数组变量的定义 结构体数组的使用 阅读全文
摘要:
#include #include #include #include using namespace std; struct student{ // 创建构造体 int num; char name[20]; ....; }; int main(){ student.stud; char filename[40]; fstream infile; // (... 阅读全文
摘要:
注意在给 char name[10] 赋值时 不能 stud.name = "xxx" ,不能把字符串赋给地址 给char name[10]赋值可以 如上代码所示 也可以 cin>>stud.name; 或者 cin.getline ( stud.name , 80) ; 阅读全文
摘要:
bool palindrome(int b){ int k = 0; char a[1000]; do { int c; c = b % 10; char d; for (int i = 0; i <= 9; i++) { if (c == i) { d = '0' + i; break; } } 阅读全文
摘要:
#include <iostream>using namespace std; int k = 0; int main(){ char a[1000]; char c; do { cin.get(c); a[k++] = c; }while (c!='\n'); } 阅读全文