Fan nomi: Dasturlash I guruh: 023-21 F. I. Sh: Sharipov Ollobergan Musabek O’g’li 1-amaliy ish 1-topshiriq
Download 120.8 Kb.
|
Dasturlash 1 amaliy ish
FAN NOMI: Dasturlash I GURUH: 023-21 F.I.Sh: Sharipov Ollobergan Musabek O’g’li 1-AMALIY ISH 1-topshiriq 13-variant Dastur kodi: #include #include using namespace std; int main() { cout<<" Bajardi: Ollobergan Sharipov"< cin>>m>>n>>c; if(n+1>0) Y=m*m*n+1-c; else if(n+1<=0) Y=pow((m+n),2)+c*m+c*m; cout<<"Y="< } 2-topshiriq Yoshni sonda aniqlovchi 20-100 gacha butun son berilgan. Son kirirtilganda yoshni unga mos so’zlarda ifodalovchi dastur tuzilsin. (“yigirma yosh”, “qirq uch yosh” va hk). Dastur kodi: #include #include using namespace std; int main() { cout<<" Bajardi: Ollobergan Sharipov"< cout<<"Yoshingizni kiriting";cin>>YOSH; a=YOSH/10; b=YOSH%10; switch(a) { case 2: cout<<"Yigirma"; break; case 3: cout<<"Yigirma bir"; break; case 4: cout<<"Yigirma ikki"; break; case 5: cout<<"Yigirma uch"; break; case 6: cout<<"Yigirma tort"; break; case 7: cout<<"Yigirma besh"; break; case 8: cout<<"Yigirma olti"; break; case 9: cout<<"Yigirma yetti"; break; case 10: cout<<"Yigirma sakkiz"; break; case 11: cout<<"Yigirma tuqqiz"; break; } switch(b) { case 1: cout<<"Bir yosh"; break; case 2: cout<<"Ikki yosh"; break; case 3: cout<<"Uch yosh"; break; case 4: cout<<"Turt yosh"; break; case 5: cout<<"Besh yosh"; break; case 6: cout<<"Olti yosh"; break; case 7: cout<<"Yetti yosh"; break; case 8: cout<<"Sakkiz yosh"; break; case 9: cout<<"Tuqqiz yosh"; break; case 10: cout<<"O'n yosh"; break; } return 0; } Download 120.8 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling