#include stdio.h #define MAX 20 void f1 ( char str1 ); void f1 ( char str1 ) { int j = 0 ; for ( int i = 0 ; i * length ; i ++ ) { if ( str1 == 'a' || ...
#include stdio.h void swap ( int x , int y ); void swap ( int x , int y ) { int temp ; printf ( "in swap, 转换前x= %d , y= %d \n " , x , y ); temp = x ; x = y ; y = temp ; printf ...
#include stdio.h #define MAX 100 #include stdbool.h bool prime ( int n ); bool prime ( n ) { int i ; if ( n == 1 ) return true ; if ( n == 2 ) return false ; for ( i = 2 ; i ...
#include stdio.h #include stdbool.h // 判断是否为素数 bool is_prime(int num) { if (num = 1) return false; for (int i = 2; i * i = num; i++) { if (num % i == 0) return false; } return tru ...
#include stdio.h int main () { int hcf ( int , int ); int lcd ( int , int ); int x , y , c ; scanf ( " %d%d " , x , y ); c = hcf ( x , y ); printf ( "hcf= %d \n " ...