Computer Science, asked by murtazayv07, 1 month ago



2. Correct the errors of the given program:
class Simplify
{
public static void main(String args[])
{
int a,b,c,d;
a=10,b=5,c=1,d=2;
c=a2+b2;
d=(a+b)2;
p=c/d;
System.out.println(C+""+""+d+
+p);
}
}

Answers

Answered by rackeldevs
1

class Simplify

{

public static void main(String args[])

{

int a,b,c,d;

a=10,b=5,c=1,d=2;

c=a*a+b*b;

d=(a+b)*(a+b);

p=c/d;

System.out.println(c+" "+d+" "+p);

}

}

please mark as brainlist

Similar questions