1 #include "stdafx.h" 2 #include<iostream> 3 //#include"function.h" 4 #include<cmath> 5 void simon(int); 6 void one(); 7 8 using namespace std; 9 10 int main() 11 { 12 one(); 13 int carrots; 14 cin >> carrots; 15 carrots += 1; 16 cout << "carrots = " << carrots << endl; 17 18 simon(5); 19 cout << "how about urs: " << endl; 20 int num; 21 cin >> num; 22 simon(num); 23 cout << "wow!" << endl; 24 system("pause"); 25 return 0; 26 27 } 28 29 30 void simon(int n) 31 32 { 33 34 cout << "oh,i have to do this " << n << " times!" << endl; 35 36 37 } 38 39 40 void one() 41 { 42 double area; 43 cin >> area; 44 double side; 45 side = sqrt(area); 46 cout << "Side is " << side << endl; 47 48 }
vs2015快捷键:
整块注释:Ctrl+K ---> Ctrl+C
整块去注释:Ctrl+K ---> Ctrl+U
浙公网安备 33010602011771号