C语言---基础

来源:互联网 发布:地图 数据可视化工具 编辑:程序博客网 时间:2024/06/08 18:28

输入3个数,从小到大输出


#include<stdio.h>void main() {int a, b, c, t;printf_s("输入3个数: ");scanf_s("%d %d %d", &a, &b, &c);if (a>b) { t = a; a = b; b = t; }if (a>c) { t = a; a = c; c = t; }if (b>c) { t = b; b = c; c = t; }printf("%d %d %d\n", a, b, c);system("pause");}


0 0
原创粉丝点击