Dasturlash i” fanidan tayyorlagan 3 Amaliy ishi
Download 1.42 Mb.
|
Akbar3-iw
- Bu sahifa navigatsiya:
- DASTURLASH I
- Natija: b) Kod: include using namespace std; void PowerA234(int a, int b, int c, int d){
- cout return 0; } Natija: 3-Topshiriq
- cout } int LokalMin=0; for(int i=1; i for(int j=1; j
MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKEMT AXBOROT TEXNOLOGIYALARI UNIVERSITETI “TELEKOMMUNIKATSIYA TEXNOLOGIYALARI” yo’nalishi 413_22 guruh talabasi Uzoqov Azamning “DASTURLASH I” fanidan tayyorlagan 3 - Amaliy ishi O’qituvchi: ISHNIYAZOV ODIL Toshkent – 2022 21-VARIANT 1-TOPSHIRIQ:
a) Kod: #include using namespace std; void Power3(int a, int b){ b = a*a*a; cout <<"a^3 = "< } int main(){ int a, b; cin >>a; Power3(a,b); cin >>a; Power3(a,b); cin >>a; Power3(a,b); } Natija: b) Kod: #include using namespace std; void PowerA234(int a, int b, int c, int d){ b = a*a; c = a*a*a; d = a*a*a*a; cout <<"a^2 = "< cout <<"a^3 = "< cout <<"a^4 = "< } int main(){ int a, b, c, d; cin >>a; PowerA234(a, b, c, d); cin >>a; PowerA234(a, b, c, d); cin >>a; PowerA234(a, b, c, d); return 0; } Natija: 2-Topshiriq
Kod: #include #include using namespace std; int main(){ float a[] = {2.5, 4.3, -1, 2, 75, 3.55, 10.48, 11, 9.8, 12, 10.5, 15.6, 18}, b[12]; for(int i=0; i<12; i++){ b[i] = exp(a[i] - i); cout <<"b["< } return 0; } Natija: 3-Topshiriq
Kod: #include #include using namespace std; int main(){ int n, m; cin >>n>>m; int s[n][m]; for(int i=0; i for(int j=0; j s[i][j] = rand()%100+10; cout < } cout < } int LokalMin=0; for(int i=1; i for(int j=1; j if(s[i][j] < s[i-1][j] && s[i][j] < s[i+1][j]){ if(s[i][j] < s[i][j-1] && s[i][j] < s[i][j+1]){ LokalMin=s[i][j]; } } } } cout <<"LokalMin = "< return 0; } Natija: Download 1.42 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling