Dasturlash tamoyillari fani


Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1


Download 58.19 Kb.
bet3/5
Sana08.11.2020
Hajmi58.19 Kb.
#142487
1   2   3   4   5
Bog'liq
JAVA 200 TA TEST

71 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A>0 || B>0 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning kamida bittasi musbat ekanligini

sonlarning bittasi juft va bittasi toq ekanligini

sonlarning xar ikkalasi toq ekanligini

sonlarning kamida bittasi toq ekanligini

72 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A%2==0 || B%2==0 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning kamida bittasi juft ekanligini

sonlarning kamida bittasi musbat ekanligini

sonlarning kamida bittasi toq ekanligini

sonlarning xar ikkalasi toq ekanligini

73 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A%2!=1 || B%2!=1 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning kamida bittasi juft ekanligini

sonlarning kamida bittasi musbat ekanligini

sonlarning xar ikkalasi toq ekanligini

sonlarning xar ikkalasi musbat ekanligini

74 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A%2==1 || B%2==1 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning kamida bittasi toq ekanligini

sonlarning kamida bittasi musbat ekanligini

sonlarning kamida bittasi juft ekanligini

sonlarning xar ikkalasi toq ekanligini

75 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A%2!=0 || B%2!=0 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning kamida bittasi toq ekanligini

sonlarning kamida bittasi juft ekanligini

sonlarning xar ikkalasi toq ekanligini

sonlarning xar ikkalasi juft ekanligini

76 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A>0 && B>0 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning xar ikkalasi musbat ekanligini

sonlarning kamida bittasi juft ekanligini

sonlarning xar ikkalasi toq ekanligini

sonlarning bittasi juft va bittasi toq ekanligini

77 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A<0 && B<0 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning xar ikkalasi manfiy ekanligini

sonlarning kamida bittasi toq ekanligini

sonlarning kamida bittasi musbat ekanligini

sonlarning xar ikkalasi toq ekanligini

78 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A%2==0 && B%2==0 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning xar ikkalasi juft ekanligini

sonlarning xar ikkalasi toq ekanligini

sonlarning xar ikkalasi musbat ekanligini

sonlarning kamida bittasi juft ekanligini

79 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A%2!=1 && B%2!=1 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning xar ikkalasi juft ekanligini

sonlarning kamida bittasi toq ekanligini

sonlarning xar ikkalasi toq ekanligini

sonlarning xar ikkalasi musbat ekanligini

80 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A%2==1 && B%2==1 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning xar ikkalasi toq ekanligini

sonlarning xar ikkalasi musbat ekanligini

sonlarning kamida bittasi toq ekanligini

sonlarning xar ikkalasi juft ekanligini

81 Fan bobi – 3; Bo’limi - 3; Qiyinchilik darajasi – 1;

Ushbu …A%2!=0 && B%2!=0 mantiqiy ifoda qanday shartni rostlikka tekshiradi (barcha javoblarda butun sonlar nazarda tutilmoqda)?

sonlarning xar ikkalasi toq ekanligini

sonlarning xar ikkalasi juft ekanligini

sonlarning bittasi juft va bittasi toq ekanligini

sonlarning kamida bittasi juft ekanligini

82 Fan bobi – 4; Bo’limi - 1; Qiyinchilik darajasi – 1;

if operatorining (instruktsiyasining) necha xil ko’rinishi mavjud.

2

3

1

4

83 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur 0 0 0 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

0 0

2 0

1 1

2 1

84 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur 1 1 1 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

3 0

2 0

1 1

2 1

85 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur 1 -2 3 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

2 1

2 0

1 1

2 2

86 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur -1 2 -3 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

1 2

2 0

1 1

2 1

87 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur -1 -2 -3 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

0 3

2 0

1 1

2 1

88 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur 20 0 10 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

2 0

2 2

1 1

2 1

89 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur 30 -30 0 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

1 1

2 0

1 2

2 1

90 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur -10 0 -5 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

0 2

2 0

1 1

2 1

91 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur 10 0 0 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

1 0

2 0

1 1

2 1

92 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Keltirilgan dastur 0 -10 0 qiymat kiritilganda qanday natija qaytaradi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

int a,b,c;

int p=0,n=0;

Scanner in=new Scanner(System.in);

a=in.nextInt();

b=in.nextInt();

c=in.nextInt();

if(a>0)p++;

if(a<0)n++;

if(b>0)p++;

if(b<0)n++;

if(c>0)p++;

if(c<0)n++;

System.out.println(p+" "+n);

}


}

0 1

2 0

1 1

2 1

93 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Quyida keltirilgan dastur qanday ishlaydi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

float x,y;

Scanner in=new Scanner(System.in);

x=in.nextFloat();

y=in.nextFloat();

if(x>y)

System.out.println(x);



else

System.out.println(y);

}

}


kiritilgan ikkita sondan kattasini bosmalaydi

agar x musbat bo’lsa x ni, aks xolda y ni bosmalaydi

qanday ishlash dasturning kayfiyatiga bog’liq

kiritilgan sonning kichigini tartib nomerini bosmalaydi

94 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Quyida keltirilgan dastur qanday ishlaydi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

float x,y;

Scanner in=new Scanner(System.in);

x=in.nextFloat();

y=in.nextFloat();

if(x>y)

System.out.println(1);



else

System.out.println(2);

}

}


kiritilgan ikkita sondan kattasini tartib nomerini bosmalaydi

agar x musbat bo’lsa x ni, aks xolda y ni bosmalaydi

qanday ishlash dasturning kayfiyatiga bog’liq

kiritilgan sonning kichigini tartib nomerini bosmalaydi

95 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Quyida keltirilgan dastur qanday ishlaydi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

float x,y;

Scanner in=new Scanner(System.in);

x=in.nextFloat();

y=in.nextFloat();

if(x>y)

System.out.println(2);



else

System.out.println(1);

}

}


kiritilgan ikkita sondan kichigini tartib nomerini bosmalaydi

agar x musbat bo’lsa x ni, aks xolda y ni bosmalaydi

qanday ishlash dasturning kayfiyatiga bog’liq

kiritilgan sonning kattasini tartib nomerini bosmalaydi

96 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Quyida keltirilgan dastur qanday ishlaydi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

float x,y;

Scanner in=new Scanner(System.in);

x=in.nextFloat();

y=in.nextFloat();

if(x>y)

System.out.println(x+” “+y);



else

System.out.println(y+” “+x);

}

}


kiritilgan sonlarning avval kattasini, so’ngra kichigini bosmalaydi

kiritilgan sonlarning avval kichigini, so’ngra kattasini bosmalaydi

qanday ishlash dasturning kayfiyatiga bog’liq

kiritilgan sonning kichigini tartib nomerini bosmalaydi

97Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Quyida keltirilgan dastur qanday ishlaydi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

float x,y;

Scanner in=new Scanner(System.in);

x=in.nextFloat();

y=in.nextFloat();

if(x>y)

System.out.println(y+” “+x);



else

System.out.println(x+” “+y);

}

}


kiritilgan sonlarning avval kichigini, so’ngra kattasini bosmalaydi

kiritilgan sonlarning avval kattasini, so’ngra kichigini bosmalaydi

qanday ishlash dasturning kayfiyatiga bog’liq

kiritilgan sonning kichigini tartib nomerini bosmalaydi

98 Fan bobi –4; Bo’limi - 1; Qiyinchilik darajasi – 3;

Quyida keltirilgan dastur qanday ishlaydi:

import java.util.Scanner;

public class shart{

public static void main(String[] args) {

float x,y;

Scanner in=new Scanner(System.in);

x=in.nextFloat();

y=in.nextFloat();

if(x>y)

System.out.println(1+” “+2);



else

System.out.println(2+” “+1);

}

}


kiritilgan sonlarning avval kattasini, so’ngra kichigini tartib nomeri bosmalaydi

kiritilgan sonlarning avval kichigini, so’ngra kattasini tartib nomerini bosmalaydi

qanday ishlash dasturning kayfiyatiga bog’liq

kiritilgan sonning kichigini tartib nomerini bosmalaydi


Download 58.19 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5




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