Question:

C Programming Question

by  |  earlier

0 LIKES UnLike

Write a program that adds two yardsfeetinches distances and store the result in the third yardsfeetinches distance. Remember to make necessary inch to feet and feet to yard conversions. Note: 12 inches = 1 foot and 3 feet = 1 yard.

Declare a second structure area which has two structure variables yardsfeetinches length and yardsfeetinches width. Write a program to calculate the area of a rectangle using the type area.

 Tags:

   Report

1 ANSWERS


  1. Where's the question? I only see a homework assignment copied word for word. Try working it out yourself and when you get stuck ask a specific question

    Umm Wow. I really don't know what your doing with all these *.33 and decimal stuff. it's actually much simpler than your making it.

    First prompt the user for 2 inputs of yards feet inches. Divide the inches by 12 and add the number to the feet. Then divide this number by 3 and add it to the yards. Do this for both the inputs and you have your 2 distances (add them toegher at the end)

    Area of a triangle is 1/2 base * height. So take your first number you got (number after all the division and additions) and multiply it by the second number then divide by 2 and that's your area. Try working this this post code and if you still have problems we can tweak what you have. I prefer to explain it to people rather than write the code so you can have a light bulb moment and say AHH i got it! then we know you actually understand it.

You're reading: C Programming Question

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.