프린트랑 스캔 함수에 대해서 질문좀요
큰모듬
2023.04.01
#include stdio.h
int main(void)
{
int x1, y1 ;
int x2, y2;
int result ;// 결과값
printf(첫 번째 좌표 x, y: );
scanf( %d %d ,&x1, &y1);
printf(두 번째 좌표 x, y:);
scanf(%d %d,&x2, &y2);
result = (x2-x1) * (y2-y1);
printf(\n사각형 넓이 값 = %d\n,result);
return 0;
}
이렇게 했는데 프로그램 실행해서
두번째 좌표값 입력하라는 프린트 함수보다 왜 스캔함수가 먼저 뜨는지 아무리 고민해도
제머리로 이해가 안되네요
해결방안좀 알려주세요
-
물
#include stdio.h
int main(void)
{
\tint x1, y1 ;
\tint x2, y2 ;
\t
\tint result ;// 결과값
\t
printf(\첫 번째 좌표 x, y : \);
\tscanf(\%d%d\