Computer Science, asked by aditipandey98, 8 months ago

please solve my question today is my online exam it's urgent please solve it..​

Attachments:

Answers

Answered by SpaceWalker17
6

\large\boxed{\fcolorbox{black}{pink}{Program\:1}}

int a=100;

int b=20;

if (a>b)

System.out.println(a);

else

System.out.println(b);

\large\boxed{\fcolorbox{black}{pink}{Program\:2}}

int x=290;

int y=300;

if(x>y)&&(y<100)

System.out.println(x+100);

else if (y>x)||(x<100)

System.out.println(y+100);

else

System.out.println(x+y);

\large\boxed{\fcolorbox{black}{pink}{Program\:3}}

String a="hello";

System.out.println(a*4);

Hope this answer will help you!!

ADDITIONAL INFORMATION;

LOGICAL OPERATOR- AND - &&(symbol)

LOGICAL OPERATOR- OR - || (symbol)

char - single inverted comma(quotation mark) is used.

String - double inverted comma (quotation mark) is used.

Similar questions