|
עמוד:436
שאלה 7 . 2 int Sum ( int x ) { return ( x / 1000 ) + ( x % 1000 / 100 ) + ( x % 100 / 10 ) + ( x % 10 ); יחידות עשרות מאות אלפים // } שאלה 7 . 3 float Sum ( int grade 1 , int grade 2 , int grade 3 ) { return ( float ) ( grade 1 + grade 2 + grade 3 ) / 3 ; } שאלה 7 . 4 int CountDiv ( int x ) { int i ; int cnt = 0 ; for ( i = 2 ; i < x ; i ++ ) if ( x % i == 0 ) cnt ++ ; return cnt ; }
|


|