[Tutorial 7] 15.The figure gives a rough sketch of a running track. It includes a rectangular shape and two semi-circles. The length of the rectangular part is 67m and breadth is 21m.Calculate the distance of the running track.
#include <stdio.h> #define PI 3.142 int main() { float distance_rectangular, distance_semi_circles, total_distance; float length_rectangular = 67.0; float breadth_rectangular = 21.0; distance_rectangular = 2 * length_rectangular ; distance_semi_circles = 2 * PI * (breadth_rectangular/2); total_distance = distance_rectangular +distance_semi_circles; /* Display the total distance*/ printf( "The distance of the running track is %.2f meters\n" , total_distance); return 0; }