Guestbook
-
-
modify / delete 2008/07/12 18:14
환타
ㅋㅋㅋ 11일에 끝났어요.ㅋㅋㅋ
결과는 나와봐야 알겠지만............
ㅋㅋㅋㅋㅋ 웃음밖에 안나와요 ㅋㅋㅋ.
다음에 열심히 하면 되는거죠 뭐 ㅋㅋ
-
-
현수 2008/06/12 12:59 modify / delete / reply
이거 주석좀 달아주실수있으세요?ㅠㅠㅠㅠ
#include <stdio.h>
main()
{
int value;
do {
printf("정수를 입력하세요.>>“);
scanf("%d",&value);
printf("입력한 수는 %d입니다.\n\n", value);
} while (value != 0);
}
#include <stdio.h>
main()
{
int i, age[5];
printf("\n ag : %p", age);
for(i = 0; I < 5; I++)
printf("\n address of age[%d] : %p", I , %age[1]);
}
#include <stdio.h>
#include <string.h>
main()
{
int length, compare;
char s1[] = "Example String";
char s2[100];
printf("%s\n",s1);
length = strlen(s1);
printf("s1의 길이 = %d\n", length);
strcpy(s2,s1);
printf("s1 =%s\ns2 = %s\n",s1,s2);
strcat(s2,"String");
printf("s2 = %s\n",s2);
compare=strcmp(s1,s2);
if(!compare) printf("s1 == s2\n");
else if(compare <0) printf(s1 < s2\n");
else printf("s1 > s2\n");
}
#include <stdio.h>
main()
{
int x = 5;
int * ptr;
printf("x 의 값은 %d\n",x);
ptr = &x;
*ptr = 10;
printf("x 의 값은 %d\n",x);
#include <stdio.h>
main()
{
int *p, *p1, *p2;
int q, q1,q2;
p = &q; p1 = &q1; p2 = &q2;
q = 10; q1=5; q2 = 3;
printf("q는 %d, p는 %d, *는 %d\n",q,p, *p);
printf("*p1 - *p2 는 %d\n", *p1 - * p2);
printf("p1은 %d, p2는 %d, ",p1,p2);
printf("p1 - p2 는 %d\n", p1 - p2);
printf("p + 100 은 %d, *(p + 100)는 %d\n", p + 100 ,*(p+100));
p=p1;
printf("*p 는 %d\n", *p);
if(p1 >p2) printf("p1 > p2\n");
else printf("p1 < p2\n");
}
#include <stdio.h>
main()
{
int I, age[5]={1,2,3,4,5};
printf("age : %p", age);
for(i = 0; i< 5; I++)
printf("\naddress of age[%d] : %p", I, &age[i]);
printf(""\n배열 age[]의 내용\n");
for(i = 0; I <5; 1++)
printf("%d", *(age+i));
#include <stdio.h>
main()
{
char * name[] = {“홍길동”,“컴퓨터 공학부”};
printf("이름 : %s\n", name[0]);
printf("학과 : %s\n", name[1]);
}
#include <stdio.h>
#include <math.h>
main()
{
double x = 2.564;
printf("%1f의 제곱근= %1f\n", x, sqrt (x));
printf("%1f의 소수점 이하 올림 = %1f\n, x, ceil (x));
printf("%1f의 소수점 이하 버림 = %1f\n, x, floor(x));
printf("sin(%if) = %1f\n",x, sin(x));
printf("cos(%1f) = %1f\n"x, cos(x));
}
#include <stdio.h>
void swap(int *x, int *y);
main(0
{
int x, y;
printf("첫 번째 숫자를 입력하라. -> “);
scanf("%d",&x);
printf("두 번째 숫자를 입력하라. ->“);
scanf("%d", &y);
swap(&x,&y);
printf("첫 번째는 숫자는 %이고 두 번째 숫자는 %입니다.\n".x.y);
}
void swap(int * x, int *y)
{
int z;
z= *x;
*x= *y;
*y = z;
}
메일로부탁드려요 ㅠㅠ sorlagustn@hanmail.net