【C语言】8-三大结构之选择结构-2

1. 条件运算符和条件表达式

有一种 if 语句,当被判别的表达式的值为“真”或“假”时,都执行一个赋值语句且向同一个变量赋值,如:

#include <stdio.h>
int main()
{
   
    
    
	int a,b,max;
	if(a>b){
   
    
    
		max = a

猜你喜欢

转载自blog.csdn.net/FuckerGod/article/details/131886373