摘要: 方式一:(适用与IE浏览器,而且刷新不提示,只在点击浏览器关闭按钮的时候提示)<script type="text/javascript">window.onbeforeunload=onclose;function onclose(){if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey){return "您要离开吗?";}}</script>--------------------------------- 阅读全文
posted @ 2011-11-12 19:22 hibernate3例子 阅读(162) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;#define max 9int main(){ int Array[max]; /*for ( int i = 0;i < max;i ++) { Array[i] = max - i; }*/ cout <<"原始数据:"; for ( int i = 0;i < max;i ++) { cin >> Array[i]; } cout << endl; ... 阅读全文
posted @ 2011-11-12 18:48 hibernate3例子 阅读(112) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cmath>using namespace std;int main(){ int x; while( cin >> x) { if( x < 0 || x > 100) { cout << "Score is error !" << endl; } else if( x >= 90) { cout << "A" << endl; ... 阅读全文
posted @ 2011-11-12 18:45 hibernate3例子 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cmath>using namespace std;int main(){ double x; cout.precision(2); while( cin >> x) { cout << fixed << fabs(x) << endl; } system("pause"); } 阅读全文
posted @ 2011-11-12 18:44 hibernate3例子 阅读(86) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cmath>using namespace std;int main(){ const double pi = 3.1415926; double x; cout.precision(3); while( cin >> x ) { cout << fixed << 4*pi*pow(x,3)/3 << endl; } system("pause"); } 阅读全文
posted @ 2011-11-12 18:44 hibernate3例子 阅读(72) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cmath>using namespace std;int main(){ double x1,y1,x2,y2; cout.precision(2); while( cin >> x1 >> y1 >> x2 >> y2) { cout << fixed << sqrt(pow((x1-x2),2)+pow((y1-y2),2)) << endl; } system("pause"); } 阅读全文
posted @ 2011-11-12 18:43 hibernate3例子 阅读(66) 评论(0) 推荐(0) 编辑