c_cpp 条件1

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp 条件1相关的知识,希望对你有一定的参考价值。

if (x<y)
{
	printf("x is less than y\n");
}
else if (x>y)
{
	printf("x is greater than y\n");
}
else
{
	printf("x is equal to y\n");
}

Note:
If it's short and only single line, can just put everything on one line if it's sufficiently short and simple:

if(condition) statement;

like:

if (target == NOTES[4]) n = 4;

以上是关于c_cpp 条件1的主要内容,如果未能解决你的问题,请参考以下文章

c_cpp 条件2

c_cpp CPP - 教程2 - 条件,数组,向量,字符串,逻辑

c_cpp CPP - 教程002 - 条件,数组,向量,字符串,逻辑

c_cpp 1.1.1乘坐USACO

c_cpp 1.两个总和

c_cpp 第1节