Raqamli texnalogiyalar


ceil (4.235601) = 5; floor


Download 0.63 Mb.
bet7/7
Sana08.01.2022
Hajmi0.63 Mb.
#240878
1   2   3   4   5   6   7
Bog'liq
Chiziqli dasturlash (Автосохраненный)

ceil (4.235601) = 5; floor (4.235601) = 4

ceil (4.9907) = 5; floor (4.9907) = 4

fmod (x,y)x butun sonni y butun songa bo„lgandagi qoldiqni hisoblaydi va natijaga haqiqiy tur beradi. % amali ham shu vazifani bajaradi, faqat bu amal natijasi butun turli bo’ladi.

hupot(x, y) x va y lar haqiqiy sonlar bo’lib, funksiya x va y katetlar bo’yi-cha to’g’ri burchakli uchburchakning gipotenuzasini hisoblaydi.

1-topshiriq.

1. Doiraning yuzasi S1 berilgan. Shu doira ichki chizilgan uchburchakning yuzasi S2 ga teng. Shu uchburchak tomonlari ko’paytmasini topish algoritmini tuzing.

2.Teng tomonli to’g’ri burchakli uchburchakning yuzasi S berilgan. uning gipotenuzasini topish algoritmni tuzing

3. Teng tomonli trapetsiyaning yon tomonlari c ga va balandligi h ga teng. yuzasi esa S bilan ifodalanadi. Uning tomonlari topish algoritmini tuzing.

Boshlash

Boshlash

1 2.

S1 ni kiriting



S1=pi*r*r; p=a+b+c;

r=a*b*c/4*s2



S=a*a;

C=√2*a;



a*b*c ni chiqaring

C ni chiqaring



Tamom

Tamom



Boshlash

S,h,c larni kiriting

S=a+b/2*h

a-b/2=c*c-h*h


3.


a va b ni chiqaring



Tamom



1.

2.

3.

//code

#include

#include

using namespace std;


int main()

{

//a*b*c=v



int s1,s2;

float pi=3.14,v;

cin>>s1;

cin>>s2;


v=sqrt(s1/pi)*4*s2;

cout<
return 0;

}


#include
#include
using namespace std;

int main()


{

int s,a,c;

cin>>s;

a=sqrt(2*s);

c=sqrt(2)*a;

cout<

}


#include

#include

using namespace std;

int main()

{

long double h,c,s;



float a,b;

cin>>s;


cin>>h;

cin>>c;


b=2*s/h+a;

a=2*sqrt(c*c-h*h)+b;

cout<

cout<

}

2- topshiriq

  1. Faylning hajmi baytlarda berilgan. Ushbu fayl necha Kb, Mb va Gb ekanligini topish dasturini tuzing.

  2. Uch xonali natural son berilgan. Ushbu sonning raqamlari yig’indisini topish dasturini tuzing.

  3. Uch xonali natural son berilgan. Ushbu sonning oxirgi raqamini boshiga o’tkazish dasturini tuzing. Misol: A=231. Almashtirishdan so’ng, A=123.



1.

2.

3.

#include

using namespace std;

int main()

{

float a,kb,mb,gb;



cin>>a;

kb=a/1024;

mb=kb/1024;

gb=mb/1024;

cout<

cout<

cout<

return 0;

}

#include

using namespace std;

int main()

{

int a,s,n;



s=0;

cin>>n;


while(n>0)

{

a=n%10;



n/=10;

s+=a;


}

cout<

return 0;

}


#include

#include

using namespace std;

int main()

{

int abc,V,s,t,k;



cin>>abc;

V=abc%10;

s=(abc%100)/10;

t=abc/100;

k=100*t+10*V+s;

cout<

}

















Bosh

A ni kiriting

kb=a/1024; mb=kb/1024;

gb=mb/1024;




Kb,mb,gb larni chiqqaring

Tamom




Bosh

A soni kiriting

Tamom

a=n%10 n/=10;

s+=a;



S ni chiqaring




Bosh

V=abc%10;

s=(abc%100)/10;

t=abc/100;

k=100*t+10*V+s;




K ni chiqaring

Tamom





3-topshiriq

1.

ifodani hisoblash dasturini tuzing.

2.



ifodani hisoblash dasturini tuzing.



3.



ifodani hisoblash dasturini tuzing.



1.

2.

3.

#include

#include

using namespace std;
int main()

{

int a,c,y,x,p;



int t,r;

cin>>a>>c>>y>>x;

p=pow(a,5)+acos(a+pow(x,3))-pow(sin(y-c),4);

t=pow(sin(x+y),3)+fabs(x-y);

r=p/t;

cout<


return 0;

}


#include

#include

using namespace std;
int main()

{

int y,d,x,R;



float e=2.71;

cin>>y>>d>>x;

cout<

return 0;

}


#include

#include

using namespace std;
int main()

{
int G,x,y,z,c;

cin>>x>>y>>c>>z;

G=(tan(pow(x,4)-6)-pow(cos(z+pow(x,3)*y),3*x))/pow(cos(pow(x,3)*pow(c,2)),2);

cout<

return 0;



}








Bosh

X,y,z,c ni kiriting

G=(tan(pow(x,4)-6)-pow(cos(z+pow(x,3)*y),3*x))/pow(cos(pow(x,3)*pow(c,2)),2);

G ni chiqaring

Tamom

Bosh

a,c,y,x,p kiriting

p=pow(a,5)+acos(a+pow(x,3))-pow(sin(y-c),4); t=pow(sin(x+y),3)+fabs(x-y);

r=p/t;


R ni chiqaring

Tamom










Download 0.63 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7




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