CodeRace/2015.5.15/반반무많이 (rev. 1.22)
#include<stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
printf("@@@@@@@@@ +=+*: *@@@@@@@@@\n");
printf("@@@@. .:*:: = += : = += **+: @@@@@\n");
printf("@@@ = ::: = : = +*:: = *# + *.*# @@@@\n");
printf("@@ *# *= *****@ == *+% *= += = # + @@@\n");
printf("@@ *### *= ++ + # + # = *%**++++* .@@@\n");
printf("@@@@ # + *+= += +###++*# + %#* @@@@@\n");
printf("@@@@@@@.****# + %#**#*..@@@@@@@@\n");
printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@.\n");
printf("Team Name : 반반무많이 \nTeam Member : 김정민 , 김준성 , 홍은지 , 황창재\n");
printf("########################################");
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int g=0;
for (int i = 1; i <= 100; i++)
{
g += i;
}
printf("1~100 의 합 = %d", g);
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int aaaa(int k)
{
if (k == 1)
return 1;
else
return aaaa(k - 1) + k;
}
int main()
{
printf("1~100 의 합 = %d", aaaa(100));
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int aaaa(int k)
{
if (k == 1)
return 1;
else
return aaaa(k - 1) + k;
}
int main()
{
int n;
scanf_s("%d",&n);
printf("1~%d 의 합 = %d",n, aaaa(n));
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
void aaaa()
{
printf("@@@@@@@@@ +=+*: *@@@@@@@@@\n");
printf("@@@@. .:*:: = += : = += **+: @@@@@\n");
printf("@@@ = ::: = : = +*:: = *# + *.*# @@@@\n");
printf("@@ *# *= *****@ == *+% *= += = # + @@@\n");
printf("@@ *### *= ++ + # + # = *%**++++* .@@@\n");
printf("@@@@ # + *+= += +###++*# + %#* @@@@@\n");
printf("@@@@@@@.****# + %#**#*..@@@@@@@@\n");
printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@.\n");
printf("Team Name : 반반무많이 \nTeam Member : 김정민 , 김준성 , 홍은지 , 황창재\n");
printf("########################################");
}
int main()
{
aaaa();
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
void aaaa(int n)
{
int i;
printf("n : %d\n", n);
for (i = 1; i < 10; i++)
{
printf("%d x %d = %d\n", i, n,i*n);
}
}
int main()
{
int n;
scanf_s("%d",&n);
aaaa(n);
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
void aaaa( int m)
{
printf("m = %d\n", m);
for (int j = 0; j < m; j++)
{
int n;
n = rand() % 9 + 1;
int i;
printf("random n : %d\n", n);
for (i = 1; i < 10; i++)
{
printf("%d x %d = %d\n", i, n, i*n);
}
}
}
int main()
{
int m;
srand(time(NULL));
scanf_s("%d",&m);
aaaa(m);
system("pause");
return 0;
}
#include"gugu.h"
int main()
{
aski();
bbbb();
return 0;
}
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
void aaaa(int m)
{
printf("m = %d\n", m);
for (int j = 0 ; j < m; j++)
{
int n = rand() % 9 + 1;
printf("random n : %d\n", n);
for (int i = 1; i < 10; i++)
{
printf("%d x %d = %d\n", i, n, i*n);
}
}
}
void bbbb()
{
int m;
srand(time(NULL));
scanf_s("%d", &m);
aaaa(m);
system("pause");
return 0;
}
void aski()
{
printf("@@@@@@@@@ +=+*: *@@@@@@@@@\n");
printf("@@@@. .:*:: = += : = += **+: @@@@@\n");
printf("@@@ = ::: = : = +*:: = *# + *.*# @@@@\n");
printf("@@ *# *= *****@ == *+% *= += = # + @@@\n");
printf("@@ *### *= ++ + # + # = *%**++++* .@@@\n");
printf("@@@@ # + *+= += +###++*# + %#* @@@@@\n");
printf("@@@@@@@.****# + %#**#*..@@@@@@@@\n");
printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@.\n");
printf("Team Name : 반반무많이 \nTeam Member : 김정민 , 김준성 , 홍은지 , 황창재\n");
printf("########################################\n");
}
1 - 5 : 3항 연산자
#include<stdio.h>
#include<stdlib.h>
int aaaa(int k)
{
return k == 1 ? (1) : aaaa(k - 1) + k;
}
int main()
{
int n;
scanf_s("%d", &n);
printf("1~%d 의 합 = %d", n, aaaa(n));
system("pause");
return 0;
}