ICSE · Computer Applications
Question 2
2 marksCISCE ICSE 2024 specimen paper · Computer Applications · Q2
Sam executes the following program segment and the answer displayed is zero
irrespective of any non zero values are given. Name the error. How the program
can be modified to get the correct answer?
void triangle(double b, double h)
{ double a;
a = ½ * b * h;
System.out.println(“Area=”+a); }

