U E D R , A S I H C RSS

새싹교실/2011/學高/4회차



1.

  • 를 받, 를 모 7를 더
    • Input three integers: 2 3 7
    • The sum of your integers plus 7 is 19

  • " x y z를 x + y * z를 " . -
  • Hint

#include <stdio.h>

int main()
{
 int x,y,z;
 
 // scanf()  
 
 // printf()  

 return 0;
}

2. 2011 3 28

2.1. :

2.1.1. (fact)

  • 만들
  • printf
    • %d: decimal integer
    • %c: character
    • %.2f: float

  • escape character
    • \n:
    • \t:
    • \", \': ",'
    • \\: \
  • data type: int, char
  • data type: float, double

  • ()

#include <stdio.h>

#define PI 3.141592

int main()
{
	int price;
	float diameter;

	printf(": ");		scanf("%f",&diameter);
	printf("( ): ");	scanf("%d",&price);

	diameter/=2;//diameter = diameter/2
	printf(": %.2f\n",PI*diameter*diameter);
	printf("  : %d\n",price/8);
	return 0;
}

2.1.2.

#include<stdio.h>

int main()
{
 int x,y,z;
 printf("Enter 3 integers: ");
 scanf("%d %d %d",&x,&y,&z);
 printf("%d+%d+%d+7=%d,x,y,z,x+y+z+7);
 return 0;
}

  • ( )

2.1.3. (feeling/finds)

  • .
  • 빨리 . .

2.2. :

2.2.1. (fact)

printf,scanf. 는데 .
%d : %.2f :
define PI 3.141592<< 코딩할때 PI라고 쓰면 숫자로 인식함. define은 중간에 수정 불가.
int float


2.2.2. (feeling/finds)

는데 . 더 많 ~

2.3. :

2.3.1. (fact)

escape character
\n
\t tab
등등..
getchar(), putchar()는 ..
Ascii code는 ..

printf scanf를 배.

printf는 scanf는 ? ..?
%d :
%.f : if, %.2f . ( 남.)

int
float
double
char
..




2.3.2. (feeling/finds)

데 막 feedback .
는 배 .

2.3.3.

#include <stdio.h>

int main ()
{
	int x, y, z;

	printf(" 3:\n");
		
	scanf("%d %d %d",&x,&y,&z);

	printf("3  7 : %d\n", x+y+z+7);

	
	return 0;


}

2.4. :

2.4.1. (fact)

.. 는데, .. 끊


는데.. .. 런..
.

-

.. 면 ..
float double는데, 더블 .
printf scanf 를 배
는데..
.
%d %f 는데 d는 f는 -


2.4.2. (feeling/finds)

.
-

2.4.3.

.
바랍 -
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:42
Processing time 0.0189 sec