正在加载图片...
Programming in C++ const float TAX RATE =0.05; / global constant float tipRate ∥ global variable void handle( int, float ) ∥ function prototype using namespace std int main( int age //age and bill local to this block float bill i ma b, and tax cannot be used here //TAX RATE and tip Rate can be used handle(age, bill); return 0; void handle(int a, float b) float tax m/a b and tax local to this block l/ age and bill cannot be used here //TAX RATE and tip Rate can be used 55 const float TAX_RATE = 0.05 ; // global constant float tipRate ; // global variable void handle ( int, float ) ; // function prototype using namespace std ; int main ( ) { int age ; // age and bill local to this block float bill ; . // a, b, and tax cannot be used here . // TAX_RATE and tipRate can be used handle (age, bill) ; return 0 ; } void handle (int a, float b) { float tax ; // a, b, and tax local to this block . // age and bill cannot be used here . // TAX_RATE and tipRate can be used }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有