>=

설명

왼쪽 변수와 연산자 오른쪽 변수를 비교. 왼쪽 피연산자가 오른쪽 피연산자보다 크거나 같으면 true 반환.

Please note that you may compare variables of different data types, but that could generate unpredictable results, it is therefore recommended to compare variables of the same data type including the signed/unsigned type.

문법

x >= y; //x가 y 보다 크거나 같으면 참

매개변수

  • x: 변수. 허용되는 자료형: int, float, double, byte, short, long
  • y: 변수 또는 상수. 허용되는 자료형: int, float, double, byte, short, long

예제 코드

void setup() { Serial.begin(9600); int x = 3; int y = 2; if (x >= y) // tests if x is greater (bigger) than or equal to y Serial.println("x is greater than or equal to y"); } void loop() { }

시리얼 모니터에 결과:

COM6
Send
x is greater than or equal to y
Autoscroll Show timestamp
Clear output
9600 baud  
Newline  

※ 주의 및 경고:

양수는 음수보다 크다.

더보기

ARDUINO BUY RECOMMENDATION

Arduino UNO R3
Arduino Starter Kit
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables.

※ OUR MESSAGES