Difference between r1.2 and the current
@@ -18,7 +18,7 @@
void main(){
printf(" :: :. : \n"
int i, j=0;
int j=0;
printf(" :: :. : \n"
@@ -62,26 +62,99 @@
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));
printf("########################################\n");
printf("N : ");
scanf("%d", &j);
printf("1~%d의 합 = %d", j, plus(j));
}
문제 2 gugu.h:
void team();
void gugu();
void team(){
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");
}
void gugu(){
int i, j, M, N;
srand(time(NULL));
team();
scanf("%d", &M);
for (i = 1; i <= M; i++){
N = rand() % 9 + 1;
for (j = 1; j < 10; j++){
printf("%d * %d = %d\n", N, j, N*j);
}
}
}
문제 2 CodeRacing.c:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "gugu.h"
void main(){
team();
gugu();
}문제1 코드:
#include <stdio.h>
int plus(int n){
if (n == 0){
else if (n == 1){
else {
}return 0;
}else if (n == 1){
return 1;
}else {
return n + plus(n - 1);
}void main(){
int 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");
printf("N : ");
scanf("%d", &j);
printf("1~%d의 합 = %d", j, plus(j));
}printf("Team Member : 김정빈, 류재상\n");
printf("########################################\n");
printf("N : ");
scanf("%d", &j);
printf("1~%d의 합 = %d", j, plus(j));
문제 2 gugu.h:
void team();
void gugu();
void team(){
void gugu();
void team(){
- 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");
}printf("Team Member : 김정빈, 류재상\n");
printf("########################################\n");
void gugu(){
int i, j, M, N;
srand(time(NULL));
team();
scanf("%d", &M);
for (i = 1; i <= M; i++){
}srand(time(NULL));
team();
scanf("%d", &M);
for (i = 1; i <= M; i++){
N = rand() % 9 + 1;
for (j = 1; j < 10; j++){
}for (j = 1; j < 10; j++){
printf("%d * %d = %d\n", N, j, N*j);
}문제 2 CodeRacing.c:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "gugu.h"
#include <stdlib.h>
#include <time.h>
#include "gugu.h"
void main(){
team();
}gugu();