#include <iostream.h> #define M 100 #define N 4 class suanshu { int count,length; char number[N],n; long double chance[N],c; char code[M]; long double High,Low,high,low,d; public: suanshu() {High=0;Low=0;} void get_number(); void get_code(); void coding(); ~suanshu(){} };
void suanshu::get_number() { cout<<"please input the number and its chance."<<endl; for(int i=0;i<N;i++) { cin>>n>>c; number=n; chance=c; } if(i==20) cout<<"the number is full."<<endl; count=i; }
void suanshu::get_code() { cout<<"please input the code''s length:"; cin>>length; while(length>=M) { cout<<"the length is too larger,please input a smaller one."; cin>>length; } for(int i=0;i<length;i++) { cin>>code; } }