Dasturlash 3-amaliy mashg’ulot Yusupboyev Akbarjon


Download 1.07 Mb.
Sana06.04.2023
Hajmi1.07 Mb.
#1333795
Bog'liq
Dasturlash 3.1


Dasturlash 3-amaliy mashg’ulot
Yusupboyev Akbarjon
1-savol

#include
#include

using namespace std;


void xona(int a, int c=1)
{
int d=0;
{
while((a/=10)>0)c++;
}
{
cout<}
}

int main()


{
int a1,a2,a3;
cin>>a1>>a2>>a3;
xona(a1);
xona(a2);
xona(a3);
return 0; }




2-savol

#include
#include

using namespace std;

int Num(int n)
{
int num=0,r;
while(n>0){
r=n%10;
num=num*10+r;
n=n/10;
}
return num;
}
int main(){
int a,b,c;
cout<<"Sonni kiriting:"<cout<<"a=";cin>>a;
cout<<"b=";cin>>b;
cout<<"c=";cin>>c;
cout<<"Teskari tartibdagi son:"<

return 0;


}

3-savol


#include


#include

using namespace std;



int main()
{ float a[5],b[5],S[5],N=0;
for(int i=0;i<5;i++)
{
cout<<"a massivning qiymatlarini kiriting ="; cin>>a[i];}
for(int i=0;i<5;i++)
{
cout<<"b massivning qiymatlarini kiriting ="; cin>>b[i];
}
for(int i=0;i<5;i++)
{
S[i]=(a[i]+b[i])/(a[i]*a[i]*sqrt(b[i]));
}
for(int i=0;i<5;i++)
{
cout<<"i="<}
return 0;
}




Bu yerda dastlabki ikkitasi nan chiqganining sababi ildiz ostida dastlabki b ning ikkita qiymati manfiy berilgan shuning uchun bizda nan chiqdi.

Download 1.07 Mb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling