Notice
Recent Posts
Recent Comments
250x250
Creative Code
compareOp.c 본문
728x90
#include <stdio.h>
int main(void)
{
int a,b;
printf("input 2 nums : ");
scanf("%d %d",&a,&b);
printf("%d > %d : %d\n",a,b, a>b); // 결과값은 0 또는 1
printf("%d > %d : %d\n",a,b, a<b);
printf("%d > %d : %d\n",a,b, a>=b);
printf("%d > %d : %d\n",a,b, a<=b);
printf("%d > %d : %d\n",a,b, a==b);
printf("%d > %d : %d\n",a,b, a!=b);
return 0;
}
728x90
'C Programming' 카테고리의 다른 글
isLeap.c(윤년,평년 구분) (0) | 2023.07.31 |
---|---|
isAlphabet.c (0) | 2023.07.31 |
bigLetter.c (0) | 2023.07.31 |
absoluteValue.c (절댓값 구하기) (0) | 2023.07.31 |
A2Z.c (대문자인지 판별하기) (0) | 2023.07.31 |