Example #1
0
void goMenu(){
    switch(_getche()){
    case '1':
        add(Mandarine);
        break;
    case '2':
        add(Peach);
        break;
    case '3':
        add(Grape);
        break;
    case '4':
        if (!(Bin[Mandarine].Weight == 0 && Bin[Peach].Weight == 0 && Bin[Grape].Weight == 0))
            showBin();
        break;
    case '5':
        if (!(Bin[Mandarine].Weight == 0 && Bin[Peach].Weight == 0 && Bin[Grape].Weight == 0))
            showPrice();
        break;
    case '6':
        about();
        break;
    case '7':
        exit(0);
        break;
    default:
        system("cls"); 
        printf("Вы промазали. Будьте впредь точнее!\n");
        system("pause");
        break;
    }
}
Example #2
0
// Show elements of multiplication group
void Field::showMultGroup(){
    for(int i = 0;i < mult_elem_number;i++){
        showBin(multGroup[i]);
    }
}
Example #3
0
// Show field elements
void Field::showElements(){
    for(int i=0;i<elem_number;i++){
        showBin(elements[i]);
    }
}