1 2 3 4

C语言三目运算符

#include <stdio.h>
#include <stdlib.h>


int main()
{
int x = 4;
int y = x > 10 ? 100 : 2000;
printf("y的值是:%d。\n", y);


system("pause");
return 0;
}

posted on 2020-12-09 15:45  三日坊主i  阅读(213)  评论(0)    收藏  举报

导航