/* * Author : Amit Dutta * Date : 08 Feb 2026 * Repo : https://github.com/notamitgamer/bsc * License : MIT License (See the LICENSE file for details) */ /* The area of a triangle can be computed by the sine law. Given 6 triangular pieces of land (a, b, angle), find their area and determine which is largest. */ /* Let Us C, Chap- 13 (Arrays), Qn No.: B(g) */ /* This file is auto-generated by a bot. */ /* This code is not compiled; it is for reference only. */ #include #include #include int main() { // Data arrays double a[] = {137.4, 155.2, 149.3, 160.0, 155.6, 149.7}; double b[] = {80.9, 92.62, 97.93, 100.25, 68.95, 120.0}; double angle[] = {0.78, 0.89, 1.35, 9.00, 1.25, 1.75}; // Assuming radians based on values < 2.0. 9.00 is treated as literal. double area, max_area = 0.0; int i, max_index = -1; printf("Plot No.\tArea\n"); printf("------------------------\n"); for (i = 0; i < 6; i++) { // Area = 1/2 * a * b * sin(angle) area = 0.5 * a[i] * b[i] * sin(angle[i]); printf("%d\t\t%.2f\n", i + 1, area); if (area > max_area) { max_area = area; max_index = i + 1; } } printf("\nLargest Plot is No. %d with Area: %.2f\n", max_index, max_area); return 0; }