摘要:
#include<iostream>//#include<cmath>using namespace std;int main(){ double x,y; int n1,n2; while( cin >> n1 >> n2 ) { x = y = 0.0; if( n1 > n2) { swap(n1,n2); } for ( int i = n1;i <= n2;i ++) { if... 阅读全文
摘要:
#include<iostream>//#include<cmath>using namespace std;int main(){ int n,x,sum; while( cin >> n ) { sum = 1; for( int i = 0;i < n;i ++) { cin >> x; if( x % 2 != 0) { sum *= x; } } ... 阅读全文
摘要:
#include<iostream>//#include<cmath>using namespace std;int lev(int n){ if((n % 4 == 0 && n % 100 != 0) || (n % 400 == 0)) { return 1; } else return 0; } int main(){ int month[2][13]= {{0,31,28,31,30,31,30,31,31,30,31,30,31}, {0,31,29,31,30,31,30,31,31,3... 阅读全文