#include void rasschet (char, int); void rasschet (char pol, int goda) { int namaz; int dni; int rakats; if (pol == 'f') { cout << "enter usual quantity of days of menstrual cikle (введите пожалуйста привычное вам количество дней менструального цикла)" << endl; cin >> dni; namaz = ((goda*365) / 12) * (30 - dni); rakats = namaz * 17; } else { namaz = goda * 365; rakats = namaz * 17; } { cout << "quantity of morning prayings, that one should fulfill(количество утренних молитв, которые следует восполнить): " << namaz << endl; cout << "quantity of day prayings, that one should fulfill (количество дневных молитв, которые следует восполнить): " << namaz << endl; cout << "quantity of pre-evening prayings, that one should fulfill(количество предвечерних молитв, которые следует восполнить): " << namaz << endl; cout << "quantity of evening prayings, that one should fulfill(количество вечерних молитв, которые следует восполнить): " << namaz << endl; cout << "quantity of night prayings, that one should fulfill(количество ночных молитв, которые следует восполнить): " << namaz << endl; cout << "on the whole yuo are to fulfill next quantity of rak`ats (всего же вам требуется выполнить следующее количество рак`атов): " << rakats << endl; cout << "good luck in fulfilling of islamic law!! (желаем вам удачи в выполнении предписаний исламского закона)!!:))" << endl; } } int main(void) { char pol; int vozrast; int goda; int age; char yes; cout << "As-salamu aleykum!!!" << endl; cout << "welcone to QADHAA-programm ver 4.0" << endl; cout << "enter your sex and press Enter (m - male, f - female): "; cin >> pol; while ((pol != 'm')&&(pol != 'f')) { cout << '\a'; cout << "enter only m or f!" << endl; cin >> pol; } cout << "enter yuor age:" << endl; cin >> age; if ((( pol == 'm' )&&(age <= 15))||(( pol == 'f' )&&(age <= 9))) { cout << "it`s so soon for you!" << endl; return(0); } else { cout << "enter age yuor start to pray: " << endl; cin >> vozrast; if ( pol == 'm' ) { goda = vozrast - 15; { if ( goda <= 0 ) { cout << "Congatulations!!! You dont need to pray QADHAA! - be happy:)"; return(0); } else { cout << "You must pray:" << goda << " years QADHAA" << endl; } } } else { goda = vozrast - 9; { if ( goda <= 0 ) { cout << "Congatulations!!! You dont need to pray QADHAA! - be happy:)"; } else { cout << "You must pray:" << goda << "years QADHAA" << endl; } } } } cout << "count in details?? y - дa, n - нет" << endl; cin >> yes; while (!((yes == 'y')||(yes == 'n'))) { cout << '\a'; cout << "enter only y or n" << endl; cin >> yes; } if (yes == 'y') { rasschet (pol, goda); } else cout << "good luck in fulfilling of islamic law!!:))" << endl; return(0); }