char* argv[]){ int nTest = 10000; TestOutPut( nTest ); char cTest = 'T'; TestOutPut( cTest ); return 0;} char* argv[]){ vector<int> vTest; for ( int i = 0; i < 4; i++) { int nInput = 0; cin>>nInput; vTest.push_back( nInput ); } for ( int j = 0; j < 3; j++) { for ( int k = j + 1; k < 4; k++) { int nTemp = 0; if ( vTest[j] > vTest[k]) { nTemp = vTest[j]; vTest[j] = vTest[k]; vTest[k] = nTemp; } } } for ( int l = 0; l < 4; l++ ) { cout<<vTest[l]<<endl; } return 0;}第二个#include "stdafx.h"#include <iostream>using namespace std;void TestOutPut( int nInput ){ cout<<nInput<<endl;}void TestOutPut( char cInput ){ cout<<cInput<<endl;}int main(int argc 第一个#include "stdafx.h"#include <iostream>#include <string>#include <vector>using namespace std;int main(int argc
c++程序编写
最新推荐文章于 2024-10-18 18:23:24 发布