// if语句实现选择结构.cpp : Defines the entry point for the console application. #include "stdafx.h" #include <stdio.h> int main() { float a,b,t; scanf("%f,%f",&a,&b); if(a>b) { t=a; a=b; b=t; } printf("%5.2f,%5.2f\n",a,b); return 0; }ps:功能实现输入两个及更多数字,排大小!
Young小杰2017-3-2 15:07 c语言学习笔记(0)2629查询中……小标签: c语言学习笔记
// if语句实现选择结构.cpp : Defines the entry point for the console application. #include "stdafx.h" #include <stdio.h> int main() { float a,b,t; scanf("%f,%f",&a,&b); if(a>b) { t=a; a=b; b=t; } printf("%5.2f,%5.2f\n",a,b); return 0; }ps:功能实现输入两个及更多数字,排大小!
发表评论: