Technology seem to be on the rampage as it is gradually reducing the need to hire a workforce. However, one…
Just came across a program I wrote then in school to calculate area of triangle using Hero’s formula.Program flowchart
1 2 |
/**<br /> *<br /> * @Author: Aghatise Osazuwa<br /> * Website: www.cscprogrammingtutorials.com<br /> *<br /> */ <br /><br />Program AreaOfTriangle;<br />const<br />PI = 3.142;<br />type<br />r=array [1..3] of real; {hold the values of sides of triangle}<br />var<br />d:r;<br />A:real;<br />K:integer;<br />s:real;<br />begin<br /> For k:= 1 to 10 Do {loop for the 10 sets of values}<br /> begin<br /> writeln ('Enter Values of first side');<br /> read (d[1]);<br /> writeln ('Enter Values of second side');<br /> read (d[2]);<br /> writeln ('Enter Values of third side');<br /> read (d[3]);<br /> s:= (d[1]+d[2]+d[3])/2; {compute s}<br /> A:= Sqrt(s*((s-d[1])*(s-d[2])*(s-d[3]))); {compute area}<br /> writeln ('Area = ', A);<br /> end<br />end. <br /> |
Android has just extended its lead in a war that could be over.Despite the Galaxy Note 7’s troubles and ultimate…
China’s Huawei Technologies wants to be the world’s second-largest maker of smartphones in two years, Richard Yu, chief executive of…
On Wednesday, Microsoft unveiled its new chat-based workspace Teams, which aims to improve collaboration among enterprise Office 365 users.Satya Nadella,…