資源簡介
用C 模擬圓弧插補(圖形) http://blog.csdn.net/z893345329/article/details/25922857
代碼片段和文件信息
#include?
#include?
#include
using?namespace?std;
void?main(){
int?x0y0xeyexi=0yi=0xyFei=1shunrr=NULL;//rr為半徑的平方
int?a1a2b1b2;
cout<<“######################“< cout<<“#歡迎來到圓弧插補程序#“< cout<<“######################“< do{
cout<<“請輸入起點坐標:“< cin>>x0>>y0;
cout<<“請輸入終點坐標:“< cin>>xe>>ye;
cout<<“請輸入圓心坐標:“< cin>>x>>y;
if((xe-x)*(xe-x)+(ye-y)*(ye-y)==(x0-x)*(x0-x)+(y0-y)*(y0-y))
rr=(xe-x)*(xe-x)+(ye-y)*(ye-y);
else?cout<<“您輸入的坐標夠不成圓弧!“<
} while(rr==NULL);
do{
cout<<“選擇圓弧方向:1、順時針;2、逆時針“< cin>>shun;
}while(shun!=1&&shun!=2);
cout<
/* x0
- 上一篇:手機號過濾去重工具源碼
- 下一篇:數(shù)碼管顯示ILOVEYOU
評論
共有 條評論