3-Amaliy vazifa 1-savol: 9-masala
Download 221.33 Kb. Pdf ko'rish
|
3chisi
3-Amaliy vazifa 1-savol: 9-masala: #include #include using namespace std; int main(){ int k , sum=0 ; // sum - yig'indini anglatadi double W, P=1; cout<<"k="; cin>>k; for (int i=1; i<=k; i++){ P=P*i; W=(pow((-1),i)*pow((i-3),2))/P; cout << sum << " + " << W << endl; sum=sum+W ; cout << " sum = " << sum < cout<<"W="< } 2-masala: 9-masala: #include #include using namespace std; int main() { int n,i=1, k=1; float x,S, P=1; cout<<"n="; cin>>n; cout<<"x="; cin>>x; while (i<=n){ for(int i=1; i<=k; i++){ P=P*i; } S=S+((pow(x,k))/P); P=1; i++; k+=4; } cout<<"Yig'indi "< return 0; } 3-savol. 9-masala: #include #include using namespace std; int main() { int k=1; for (int i=1; i<=4; i++){ for (int j=1; j<=4; j++){ if (k<=9){ if (i == j) cout<<"0 "; else cout< }else{ if (i == j) cout<<"0 "; else cout< } } cout< return 0; } Bajardi: Karimov Muhammadyahyo Download 221.33 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling