-
大小: 2.99KB文件類型: .zip金幣: 1下載: 0 次發(fā)布日期: 2021-02-21
- 語言: C/C++
- 標(biāo)簽:
資源簡介
C++實戰(zhàn)源碼-桃園三結(jié)義(入門級實例044).zip
代碼片段和文件信息
//?Order.cpp?:?Defines?the?entry?point?for?the?console?application.
//
#include?“stdafx.h“
int?main()
{
????int?a?b?c?t; //定義4個基本整型變量a,b,c,t
????printf(“請輸入3個人的年齡:\n“); //雙引號內(nèi)普通字符原樣輸出并換行
scanf(“%d%d%d“?&a?&b?&c); //輸入任意3個數(shù)
if?(a? {
t?=?a;
a?=?b;
b?=?t;
}
if?(a? {
t?=?a;
a?=?c;
c?=?t;
}
if?(b? {
t?=?b;
b?=?c;
c?=?t;
}
printf(“年齡排序如下:\n“);
printf(“%d%d%d\n“?a?b?c); //輸出函數(shù)將abc的值順序輸出
return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????725??2010-07-31?10:24??Order\Order.cpp
?????文件????????4524??2010-07-30?16:15??Order\Order.dsp
?????文件?????????535??2010-07-30?16:15??Order\Order.dsw
?????文件?????????292??2010-07-30?16:15??Order\StdAfx.cpp
?????文件?????????769??2010-07-30?16:15??Order\StdAfx.h
?????文件??????????26??2010-11-13?09:48??Order\程序使用說明.txt
評論
共有 條評論