Ejemplo n.º 1
0
void myMain(){
    
    welcomeUser();
	inputYear();
	inputWeight();
	computeFee(year, weight);
    reportFee(weight, weightClass, fee);
    
    char yesOrNo[100];
	printf("Would you like to calculate another? y/n ");
	scanf("%s", yesOrNo);
    
	if (strncmp(yesOrNo, "y", 2) == 0) {
		printf("\n");
		myMain();
	}
    
	if (strncmp(yesOrNo, "n", 2) == 0) {
		printf("Good bye!");
	}

}
Ejemplo n.º 2
0
void FormModifyWeight::mtcKeyPressed(MtcKeyPressedEvent *mtcKeyEvent)
{

    switch(m_nEditStatus)
    {
    case esInit:
        chooseFunc(mtcKeyEvent);
        break;
    case esWeight:
        inputWeight(mtcKeyEvent);
        break;
    case esAxisNo:
        inputAxisNo(mtcKeyEvent);
        break;
    case esAxisCount:
        inputAxisCount(mtcKeyEvent);
        break;
    default:
        break;
    }
    mtcKeyEvent->setKeyType(KC_Func);
}