資源簡介
三角形邊界值測試,有用例設計的報告文檔哦~
代碼片段和文件信息
#include
#include
using?namespace?std;
int?main()
{
int?abcmatchend=1;
while(end==1)
{
match=0;
cout<<“請輸入三個整數(中間用空格隔開):“;
????cin>>a>>b>>c;
//if((a>=‘a‘&&a<=‘z‘)||(b>=‘a‘&&b<=‘z‘)||(c>=‘a‘&&c<=‘z‘))
if(!(a>=0&&a<=9)&&!(b>=0&&b<=9)&&!(c>=0&&c<=9))
{
end=0;
}
else
{
????????if(a>=1&&a<=200&&b<=200&&b>=1&&c>=1&&c<=200)
{
????????if(a==b)
{
????????????match=match+1;
}
????????if(a==c)
{
????????????match=match+2;
}
????????????if(b==c)
{
????match=match+3;
}
????????????if(match==0)
{
????????????if(a+b<=c)
{
????????????cout<<“這不是三角形!“;
}
????????????else?if(a+c<=b)
{
????????????cout<<“這不是三角形!“;
}
????????????else?if(b+c<=a)
{
????????????cout<<“這不是三角形!“;
}
????????????else
{
????????????cout<<“這是一個普通三角形。“;
}
}
????????????else?if(match==1)
{
????????????if(a+b<=c
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????566??2002-03-18?10:32??測試\c2.ppt.lnk
?????文件?????544856??2010-03-18?21:35??測試\Debug\first.exe
?????文件?????790552??2010-03-18?21:35??測試\Debug\first.ilk
?????文件?????189482??2010-03-18?21:35??測試\Debug\first.obj
?????文件????2034280??2010-03-18?21:11??測試\Debug\first.pch
?????文件????1115136??2010-03-18?21:35??測試\Debug\first.pdb
?????文件??????74752??2010-03-18?21:35??測試\Debug\vc60.idb
?????文件?????110592??2010-03-18?21:35??測試\Debug\vc60.pdb
?????文件???????1888??2010-03-18?21:35??測試\first.cpp
?????文件???????3389??2010-03-18?21:11??測試\first.dsp
?????文件????????518??2010-03-18?21:35??測試\first.dsw
?????文件??????33792??2010-03-18?21:35??測試\first.ncb
?????文件??????48640??2010-03-18?21:35??測試\first.opt
?????文件????????741??2010-03-18?21:35??測試\first.plg
?????文件????????276??2010-03-18?12:08??測試\測試.txt
?????目錄??????????0??2010-03-18?21:35??測試\Debug
?????目錄??????????0??2010-03-18?21:35??測試
-----------?---------??----------?-----??----
??????????????4949460????????????????????17
- 上一篇:PB實現拖拽或粘貼文件
- 下一篇:黑莓移動SB
評論
共有 條評論