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

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

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

}

}

cin >> Result;

cout << \<> Result; goto loop;

void NewQuestion(int& int1,int& int2) { } //

int main( ) {

int num1;

cout << setw( 10 ) <<\<

NewQuestion(num1,num2); int num2;

srand( time( 0 ) ); int2 = 0 + rand( ) % 10;

cout << setw( 5 ) << int1 << \ << int2 << \; int1 = 0 + rand( ) % 10;

do{

cin>> Result;

while ( Result != num1* num2 ) } 6.57

#include #include #include #include #include using namespace std;

{

cout << \<> Result;

cout << \<<\<

}

}while( Result != num1* num2 );

void NewQuestion(int&,int&); //int Resultvalue( );

int main( ) {

}

int Rcase = 1 + rand() % 4; switch( Rcase ) { case 1:

cout << \<<\<

//cout << \ cin >> Result; int num1;

srand( time( 0 ) );

cout << setw( 10 ) <<\<

NewQuestion(num1,num2); cin>> Result;

while ( Result != num1* num2 ) int Wcase = 1 + rand() % 4; switch( Wcase ) { case 1:

cout << \<

cout << \<

cout << \<

cout << \<

{ int num2;

loop:

case 2:

case 3:

case 4:

default:

}

break;

cout << \<<\<

cout << \<<\<

cout << \<<\<

case 2:

case 3:

case 4:

default:

//cout << \ NewQuestion(num1,num2); cin>> Result; goto loop;

void NewQuestion(int& int1,int& int2) {

int1 = 0 + rand( ) % 10; } 6.58

#include #include #include #include #include using namespace std;

void NewQuestion(int&,int&); //int Resultvalue( );

int main( ) {

int num1;

double Wcounter1 = 1; double Rcounter2 = 0; srand( time( 0 ) );

cout << setw( 10 ) <<\<

int2 = 0 + rand( ) % 10;

cout << setw( 5 ) << int1 << \ << int2 << \;

int Result;

NewQuestion(num1,num2); cin>> Result;

while ( Result != num1* num2 ) ++Wcounter1;

int Wcase = 1 + rand() % 4; switch( Wcase ) { case 1: }

//cout << \ cin >> Result;

if ( Wcounter1 + Rcounter2 == 10 ) goto next;

++Rcounter2; //right number. int Rcase = 1 + rand() % 4; switch( Rcase ) { case 1:

cout << \<<\<

cout << \<<\<

cout << \<<\<

cout << \<

cout << \<

cout << \<

cout << \<

{ }

loop:

if ( Wcounter1 + Rcounter2 == 10 )break;

case 2:

case 3:

case 4:

default:

case 2:

case 3:

}

case 4:

cout << \<<\<

default:

//cout << \ NewQuestion(num1,num2); cin>> Result; goto loop;

if( Rcounter2/10.0 <0.75 )

cout << \;

next:

else

if( Rcounter2/10.0 >=0.75 )

cout << \;

void NewQuestion(int& int1,int& int2) {

int1 = 0 + rand( ) % 10; } 6.59

#include #include #include #include #include using namespace std;

void NewQuestion(int&,int&,int); //int Resultvalue( );

int main( ) {

int num1; int choice; int Result;

double Wcounter1 = 1; double Rcounter2 = 0; srand( time( 0 ) );

int num2;

int2 = 0 + rand( ) % 10;

cout << setw( 5 ) << int1 << \ << int2 << \;

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

}}cin>>Result;cout<<\<Result;gotoloop;voidNewQuestion(int&int1,int&int2){}//i
推荐度:
点击下载文档文档为doc格式
8lwww86r4o862m61dk4v721et5ixox005np
领取福利

微信扫码领取福利

微信扫码分享