Telekomunikatsion texnologiyalar
Download 349.75 Kb.
|
deadline
- Bu sahifa navigatsiya:
- 35-VARIANT 1-Topshiriq
MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKEMT AXBOROT TEXNOLOGIYALARI UNIVERSITETI “TELEKOMUNIKATSION TEXNOLOGIYALAR” yo’nalishi talabasi Uzakov A’zam “ DASTURLASH I” fanidan tayyorlagan AMALIY ishi 35-VARIANT 1-Topshiriq:
a)Kod: #include int daysUntilNewYear(int day, int month, int year) { int newYearDay = 1; int newYearMonth = 1; if (month < newYearMonth || (month == newYearMonth && day < newYearDay)) { return (newYearMonth - month - 1) * 30 + (30 - day) + newYearDay; } else { return (12 - month) * 30 + (newYearMonth - month - 1) * 30 + (30 - day) + newYearDay; } } int main() { int day, month, year; std::cout << "Sanani kiriting (kun/oy/yil): "; std::cin >> day >> month >> year; int remainingDays = daysUntilNewYear(day, month, year); std::cout << "Yangi yilgacha qolgan kun: " << remainingDays << std::endl; return 0; } Natija: b) Kod: #include using namespace std; int main(){ int a,b,c; cin >>a>>b>>c; cout < } Natija: Download 349.75 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling