Math, asked by evergreenamrita4522, 1 year ago

system.Out.Println("max of" + a + and + b + "is" +max); are find arrer

Answers

Answered by nain31
2
 \huge \bold{ERROR}

Any obstruction or mistake in the coding that stops the execution of the program is an error.

 \huge \bold{TYPES \: OF \:ERROR}

 \bold{Syntax \: error}

The errors caused due to any gramitical mistake done by user while writing coding of the program are called syntax error.

Example :- Missing of semicolon or double qoutes.

 \bold{Logical \: error}

The error present in the logic of program, are known as logical errors.

Example :- If the user want to print even number and he did logic

for(i=1 ; i<=10 ;i+=2)

System. out. println(i);

It will print all odd numbers from 1 -10 ,while user wants even numbers.

So, coding should be,

for(i=0 ; i<=10 ;i+=2)

System. out. println(i);

 \bold{Run \: time\: error}

After the syntax error and logic error are removed , there are errors that appears during execution of program they are known as run time error.

Example :- Dividing a number by zero will give an infinite value.

 \bold{IN \: THE \: QUESTION }

sys tem . Out . Println("max of" +a+ and + b+"is" +max);

In the following segment of program ,there is  \bold{SYNTAX \: ERROR}

Because,

▶sys tem . out . println should be written as  \bold{System \: . \: out\: . \: println}

▶The text written in brackets should be

 \bold{"max \: of" +a+"and" +b+"is"+max}

So, the coding should be,

 \boxed{\bold{System \: . \: out\: . \: println("max \: of" +a+"and" +b+"is"+max)}}
Answered by jeevankishorbabu9985
12

Answer:

\huge \bold{ERROR}ERROR

Any obstruction or mistake in the coding that stops the execution of the program is an error.

\huge \bold{TYPES \: OF \:ERROR}TYPESOFERROR

◼\bold{Syntax \: error}Syntaxerror

The errors caused due to any gramitical mistake done by user while writing coding of the program are called syntax error.

Example :- Missing of semicolon or double qoutes.

◼\bold{Logical \: error}Logicalerror

The error present in the logic of program, are known as logical errors.

Example :- If the user want to print even number and he did logic

for(i=1 ; i<=10 ;i+=2)

System. out. println(i);

It will print all odd numbers from 1 -10 ,while user wants even numbers.

So, coding should be,

for(i=0 ; i<=10 ;i+=2)

System. out. println(i);

◼\bold{Run \: time\: error}Runtimeerror

After the syntax error and logic error are removed , there are errors that appears during execution of program they are known as run time error.

Example :- Dividing a number by zero will give an infinite value.

\bold{IN \: THE \: QUESTION }INTHEQUESTION

sys tem . Out . Println("max of" +a+ and + b+"is" +max);

In the following segment of program ,there is \bold{SYNTAX \: ERROR}SYNTAXERROR

Bcoz. ,

▶sys tem . out . println should be written as \bold{System \: . \: out\: . \: println}System.out.println

▶The text written in brackets should be

\bold{"max \: of" +a+"and" +b+"is"+max}"maxof"+a+"and"+b+"is"+max

So, the coding should be,

\boxed{\bold{System \: . \: out\: . \: println("max \: of" +a+"and" +b+"is"+max)}}

System.out.println("maxof"+a+"and"+b+"is"+max)

Step-by-step explanation:

thx

Similar questions