08 2011 档案
摘要:1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #include <ctype.h> 5 #include <stack> 6 usingnamespace std; 7 8 stack<float> OperandStack; 9 stack<char> OperatorStack; 10 11 char priority[]={'(', ')', '', '+'
阅读全文
摘要:1、struct ,union两种结构的特点,所占内存特点(比如内存对齐)。2、enum的用法3、typedef 联合 struct的用法…………
阅读全文
摘要:1 #include <stdio.h> 2 #include <string.h> 3 char haab[18][10]={ 4 "pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", 5 "yax", "zac", "ceh", "mac&
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 4 char d[100][51]; 5 struct node 6 { 7 int p; 8 int r; 9 };10 11 node s[100];12 13 int cmp( constvoid*a, constvoid*b)14 {15 return ((node*)a)->r - ((node*)b)->r;16 }17 int DNAsort(char a[],int n)18 {19 int count =0;20 for(int i =0; i <
阅读全文
摘要:#include<iostream>using namespace std;int main(int argc, char* argv[]){ int p,e,i,d; int index=0; while(cin>>p>>e>>i>>d) { if(p==-1) break; int n=(5544*p+14421*e+1288*i-d)%(21252); if(n<=0) n+=21252; cout<<"Case "<<++index<<": the nex
阅读全文
摘要:#include <stdio.h>#define PI 3.1415926int main(){ int n, i = 0, year; double x, y, area; scanf("%d", &n); while (i < n) { scanf("%lf %lf", &x, &y); area = 0.5 * PI * (x*x+y*y); year = area/50; printf("Property %d: This ...
阅读全文