|
Guruh talabasi Marksova Muqaddas Zokir qizi Dasturlash1 fanidan 1-amaliyot ishi
|
tarix | 07.04.2023 | ölçüsü | 330,88 Kb. | | #94605 |
| 1-ish
963-21-guruh talabasi Marksova Muqaddas Zokir qizi
Dasturlash1 fanidan 1-amaliyot ishi
1. A,B,C sonlar berilgan A ning qiymati B ga, B ning qiymati C ga, C ning
aiymati A ga almashtirilsin.
#include
using namespace std;
int main()
{
int A,B,C,a,b,c;
cout<<"A:"; cin>>A;
cout<<"B:"; cin>>B;
cout<<"C:"; cin>>C;
b=A;
c=B;
a=C;
cout<<"A = "<
cout<<"B = "<
cout<<"C = "<
;
}
2.
2ab
2 3
ln ax 2
#include
#include
using namespace std;
int main()
{
double a,b,c,x,q;
cin>>a>>b>>c>>x;
bool f=true;
if(a*b!=0)
{
q=1.0*(a*x*x+pow(b*c,1/3.0))/(2*a*b);
cout<<"Q = "<
f=false;
}
if(x<0)
{
0sin aагарbx
Q
0, abагар
32 bcax
q=1.0*(pow(sin(x),2)+b*b*b)/(log(a*x*x));
cout<<"Q = "<
f=false;
}
if(f)
cout<<"hech qaysi shartga tushmaydi!";
}
3. S 1
x1
1!
x 2
2!
x 3
3!
...
x n
n!
#include
#include
using namespace std;
int main(){
int n,x;
cin>>n>>x;
double t=0,p=1,y=0;
for(int i=0;i
t+=(double)pow(-1,(n-1))*pow(x,(2*n-2));
p*=2*n-2;
p++;
}
printf("%.3f",p+t);
}
Dostları ilə paylaş: |
|
|