Computer Science, asked by aryankrish29, 4 months ago

An athlete takes 18 rounds of a triangular park with sides as 30m, 25m, and 35m. Write a program
to determine the total distance covered by him.​

Answers

Answered by memanan03
1

C Program:

#include<stdio.h>

#include<conio.h>

main()

{

int nr, s1, s2, s3, p, d;

// nr = no. of rounds, s1/s2/s3 = sides, p=perimeter, d = distance covered

scanf ("%d", & nr,s1,s2,s3);

p = s1 + s2 + s3;

d = p * nr;

printf("Distance Covered =", d);

getch();

}

Similar questions