Notice
Recent Posts
Recent Comments
250x250
Creative Code
triangle.c(삼각형의 넓이 구하기) 본문
728x90
#include <stdio.h>
int main(void)
{
int a; // 밑변길이
int b; // 높이
printf("밑변길이 : ");
scanf("%d",&a);
printf("높이 : ");
scanf("%d",&b);
printf("삼각형의 넓이 : ");
double s = a * b / 2.0;
printf("%.1f\n",s);
return 0;
}
728x90
'C Programming' 카테고리의 다른 글
absoluteValue.c (절댓값 구하기) (0) | 2023.07.31 |
---|---|
A2Z.c (대문자인지 판별하기) (0) | 2023.07.31 |
myProfile.c (내 정보 입력하기) (0) | 2023.07.31 |
hello9.c(hello world출력) (0) | 2023.07.31 |
hello.c(hello world출력) (0) | 2023.07.31 |