Question: Programming in C Must have to use all Assignment Objectives Assignment objectives: Arrays Loops Decision making Functions Problem Description: Write a program that generates a

Programming in C

Must have to use all Assignment Objectives

Assignment objectives:

  • Arrays
  • Loops
  • Decision making
  • Functions

Problem Description:

Write a program that generates a sequence of 18 random numbers between 1 and 99. Each three number in sequence represents a side of a triangle. Therefore, you will have six sets of three numbers each representing a side of a triangle. Your program must check each set to see if they could make a valid triangle and if so, compute the area of that triangle and display the sides and the area of the valid triangles.

A triangle is valid if sum of its two sides is greater than the third side. If three sides are a, b and c, then three conditions should be met.

Programming in C Must have to use all Assignment Objectives Assignment objectives:

Requirement:

  • Must use array to save random numbers
  • Must use a user defined function to generate random number
  • Must use function to calculate area of a valid triangle
  • Must use function to determine if triangle is valid
  • Functions Must be generic, they should not display anything

General requirement

1. Next few line of your source code must be comments describing what this program is supposed to do.

2.The first output (display) must be your name

3.The source code file must include comments documenting the design.

4. Indentation and spacing should be used to make the program readable.

(a +6>6) . (a+c>6) a L - b (6+c>a)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!