문제1 코드: #include int plus(int n){ if (n == 0){ return 0; } else if (n == 1){ return 1; } else { return n + plus(n - 1); } } void main(){ int i, j=0; printf(" :: :. : \n" " *== +++ =**\n" " :: =: :.. +++ :*. :==\n" " *:* **+ ++* * + ***\n" " .+* ** *:*\n" " *=+= := .+ +:\n" " +=** :++ . . ...\n" " .===: . . #=============#+\n" " ..:+===: * *=\n" " . . * . .*=\n" " * :##** .*=\n" " ..++ .*+. * ##**** *=\n" " . :++*++. =###### +#*#: # ****#. ...:#+\n" " :==++== =####*****##. ##*#***** ##**= ##****.:::::...\n" " .. =*#******###*= +***#:.***+ .****::***# :+#***** +\n" " +*#***##*+=:.. +#*#=. ****+*#%*=. .#*** .+*##:#****:+**##.\n" " :*#*#*==: *#*****.. =*#**. .*****##*: *****+###*. :#***###:\n" " #***** .:. #*****##****#*. =#####**. .****\n" " ... *****+ ....=**.. :******#******= .:+:.\n" " ====+:.. #*******###%*= .:##**##++. +**.\n" " ++#######+=. :*%##***#+. +**\n" " .++=+: ...#***#. ***\n" " =+= . +*#*: :##\n" " .*+ = :+:+.\n" " ...+= : .===**\n" " ++ .=. :+.\n" " ..+*=+ .. +=:.\n" " =**+ :+ #:+ +\n" " ++= . :+ =*==\n" " +**: ++ ++= . ++\n" " :: + =+= ::: **\n" " = ++ . :\n" " = *+\n"); printf("Team Name : 진짜김정빈\n"); printf("Team Member : 김정빈, 류재상\n"); printf("########################################\n"); for (i = 1; i <= 100; i++){ j = j + i; } printf("1~100의 합 = %d\n", j); printf("1~100의 합 = %d\n", plus(100)); printf("N : "); scanf("%d", &j); printf("1~%d의 합 = %d", j, plus(j)); }