if 语句

44 阅读1分钟
#include <stdio.h>
int main(){
	// 选择
	int score = 0;
	
	printf("输入一个分数:");
	scanf("%d",&score);
	
	if(score == 100){
		printf("恭喜你 \n");
		printf("100分,出去玩吧! \n");	
	} 	
}

运行结果:

image.png


![image.png](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/87649c90ea764467bf3d0384ee33ecf0~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAgb3p5em8=:q75.awebp?rk3s=f64ab15b&x-expires=1773798850&x-signature=uPGsatDmdj2hhbuYHITNQ%2Ba4LVc%3D)

运行结果:

image.png

image.png

image.png