摘要:
#include #include using namespace std;void main(){char szInput[256];char szCreate[256];char ch;cin >> szInput;ifstream input(szInput, ios::in);if (input.fail()){ cout > szCreate;ofstream objectFile(szCreate);if (objectFile.fail()){cout > ch){objectFile > wait;} 阅读全文
摘要:
#include using namespace std;int GetPeach(int nDay){if(nDay == 11){return 1;}return (GetPeach(nDay + 1) + 1) * 2;}void main(){int nTotal = 0;nTotal = GetPeach(1);cout > wait;} 阅读全文
摘要:
int main(){int datas[10] = {-1, 2, 3, 4, 5, 6, 7 ,8, 9, 10};int max = 0;int min = 0; for(int i = 0; i datas[i]){min = datas[i];}}}cout > wait; return 0;} 阅读全文
摘要:
int datas[10] = {1, 2, 3, 4, 5, 6, 7 ,8, 9, 10};int *result = find(datas, datas + 10, 2);if(result == datas + 10){cout << "没有找到" << endl;}else{cout << "已经找到" << endl;}//输出已经找到 阅读全文