diff --git a/万维调考试题源码/4-1.c b/万维调考试题源码/4-1.c new file mode 100644 index 0000000..cbc1b94 --- /dev/null +++ b/万维调考试题源码/4-1.c @@ -0,0 +1,43 @@ +/*----------------------------------------------------------------------- +ơ +----------------------------------------------------------------------- +дż֮ͣ +ʾ +100 222 656 899 65 +еż֮Ϊ978 +------------------------------------------------------------------------- +ע⣺Ķеݣ¶ +------------------------------------------------------------------------*/ +#include +int sum_of_even(int arr[], int size); +int main() +{ + int numbers[5]; + int i; + int even_sum; + printf(""); + for (i = 0; i < 5; i++) + { + if (scanf("%d", &numbers[i]) != 1) + { + printf("ȷ\n"); + return 1; + } + if (numbers[i] <= 0) + { + printf("ȷ\n"); + return 1; + } + } + even_sum = sum_of_even(numbers, 5); + printf("еż֮Ϊ%d\n", even_sum); + return 0; +} +int sum_of_even(int arr[], int size) +{ + int sum = 0; + int i; + /**********Program**********/ + + /********** End **********/ +} diff --git a/万维调考试题源码/4-2.c b/万维调考试题源码/4-2.c new file mode 100644 index 0000000..a07078b --- /dev/null +++ b/万维调考试题源码/4-2.c @@ -0,0 +1,31 @@ +/*----------------------------------------------------------------------- +ơ +----------------------------------------------------------------------- +涨ַֻĸ*šдfun书:ַеǰ +*ȫ +ɾ мβ* Ųɾ磬 ַе +:"*******A*BC*DEF*G****"ɾ +ַдеӦ:"A*BC*DEF*G****"дʱʹC +ṩַ + +------------------------------------------------------------------------- +ע:Ķmain еκ, +ںfun Ļд,Զ± +Զ +------------------------------------------------------------------------*/ +#include +void fun(char *a) +{ + /**********Program**********/ + + /********** End **********/ +} +main() +{ + char s[81]; + printf("Enter a string:\n"); + gets(s); + fun(s); + printf("The string after deleted:\n"); + puts(s); +}