From da63a1d6343869f1f8548779188d53e716ad82f4 Mon Sep 17 00:00:00 2001 From: smallkun Date: Tue, 1 Apr 2025 16:36:23 +0800 Subject: [PATCH] Auto commit --- 万维调考试题源码/10-2.c | 26 +++++++++++++++++++++++--- 万维调考试题源码/4-1.c | 8 ++++++-- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/万维调考试题源码/10-2.c b/万维调考试题源码/10-2.c index 0940bfb..7cb9f59 100644 --- a/万维调考试题源码/10-2.c +++ b/万维调考试题源码/10-2.c @@ -29,12 +29,32 @@ char *fun(char input[]) } int outputIndex = 0; /**********Program**********/ - int i; + int i, s=0, t=1, j, k; for(i=0;i= '0' && input[i+1] <= '9'){ + i++; + } + while(input[i] != '['){ + s+=(input[i]-48)*t; + t*=10; + i--; + } + i++; + while(input[i] >= '0' && input[i] <= '9') i++; + for(j=0;j 0){ + money = money + money*0.04; + money -= 10; + year++; + } /********** End **********/ printf("%d ˻ϵǮᱻ", year); printf("\n"); return 0; -} \ No newline at end of file +}