好文档 - 专业文书写作范文服务资料分享网站

C++大学教程习题解答(第七版) 

天下 分享 时间: 加入收藏 我要投稿 点赞

bool iseven( int );

int main( ) {

cout<

cout << \ cout << \

// if( multiple( x,y )==1 ) // // }

bool iseven( int number) { }

if( number % 2 ==0 )

return true; return false; else // else

cout<<\; cin >> x ; int x;

6.22

#include using namespace std; void printSar( int );

int main( ) { }

void printSar( int number) {

for( int counter1 = 1;counter1 <= number; counter1 ++ ) {

for( int counter = 1; counter <= number ;counter++ ) cout<<\; cin >> x ; return 0; int x;

printSar( x );

}

}

cout<<'*';

cout<

6.23

#include using namespace std; void printSar( int,char ); char fillCharacter( char );

int main( ) { }

void printSar( int number,char character ) { }

char fillCharacter( char Character ) { } 6.24

#include using namespace std; int Divide( int,int ); int Remainder( int, int ); int NumberOrder( int );

int main( )

return Character;

for( int counter1 = 1;counter1 <= number; counter1 ++ ) { }

for( int counter = 1; counter <= number ;counter++ ) cout<

cout<<\; cin >> x ; cin >> c; return 0; int x; char c;

printSar( x,c );

cout<

{ }

int Divide( int number1,int number2 ) { }

int Remainder( int number1,int number2 ) { }

int NumberOrder( int number3 ) { }

} return 0;

if ( Remainder( number3 ,mode ) == number3 ) { }

for( int counter1=counter-1, mode1 = mode ;counter1 >= 1,mode1 = mode1 / { }

cout<

cout<<\<

for ( int counter = 1,mode=1;counter <= 5; counter++ ) {

mode = mode * 10; return number1 % number2 ; return number1 / number2 ; int x,y; short z;

cout<<\; cin >> x ; cin >> y; cin >> z;

cout << \ << Divide( x,y ) << endl; cout << \<< Remainder( x,y )<

10;counter1-- )

6.25

#include #include using namespace std;

double TimeFunction(int,int,int);

int main() { }

double TimeFunction(int Hours,int Minutes,int Seconds) { } 6.26

#include #include using namespace std;

double Fahrenheit( int ); double Celsius( int );

int main() {

int DegreeFahrenheit; //华a氏o?温?度¨¨ int DegreeCelsius;

//摄|?氏o?温?度¨¨

return Hours *3600 + Minutes * 60 + Seconds ; cout << \; cin >> H_2 >> Colon1 >> M_2 >> Colon2 >> S_2;

cout << \The seconds from the last clock struck 12 o'clock is: \<< TimeFunction( H_2, cout << \<< fabs( TimeFunction( H_1, cout << \; cin >> H_1 >> Colon1 >> M_1 >> Colon2 >> S_1;

cout << \The seconds from the last clock struck 12 o'clock is: \<< TimeFunction( H_1, int H_1, M_1,S_1; int H_2, M_2,S_2; char Colon1,Colon2;

M_1,S_1 ) <

M_2,S_2 ) <

M_1,S_1 ) - TimeFunction( H_2, M_2,S_2 ) )<

}

cout << fixed << setprecision( 2 );

cout << \; cin >>DegreeFahrenheit ;

cout << \<< Celsius( DegreeFahrenheit )<

cout << \; cin >>DegreeCelsius ;

cout << \<< Fahrenheit( DegreeCelsius )<

cout << \<

{

cout << Celsius( counter )<<'\\t'; {

cout << Fahrenheit( counter )<<'\\t';

if( i% 10 ==0 )

cout << endl; i++;

if( i% 10 ==0 )

cout << endl; i++;

double Fahrenheit( int temperature ) { }

double Celsius( int temperature ) { }

return ( temperature - 32 ) / 1.8; return temperature * 1.8 + 32;

6.27

#include

8lwww86r4o862m61dk4v721et5ixox005np
领取福利

微信扫码领取福利

微信扫码分享