foo(5)?
void foo ( int b ) {
i f ( b % 3 > 1 ) {
for ( int i = b ; i > 0 ; i ) {
cout << i /b ;
}
cout << " ! \ n" ;
} e l s e {
while ( b > 0 ) {
cout << b ;
b --;
}
cout << " ?\n" ;
}
}
since 5%3 is greater than one the if statement is completed: I'm assuming that the output is 5/5 4/5 3/5 2/5 1/5
This post has been edited by jimblumberg: 06 August 2012 - 10:12 AM
Reason for edit:: Added missing Code Tags, Please learn to use them.

New Topic/Question
Reply



MultiQuote




|