Question: pleae solve this programming problem , using C Programming ,and not C++ or Java. During this Spring break, Sam had enough time to make some
pleae solve this programming problem , using C Programming ,and not C++ or Java.
During this Spring break, Sam had enough time to make some nice tour in the UAE. He had spent total of 8 days in visiting Dubai, Ras Al-khaimah and Fujairah. His cost per day in Dubai was 750 AED, while Ras Al-khaimah daily cost was 550 AED, and he spent 650 AED for each day in Fujairah, with grand total of 5400 AED. The number of days he spent in Dubai was the same as the total number of days in both Ras Al-khaimah and Fujairah. Eventually, when he came back, he asked you to write a program to find out how many days did he spend in each city during his tour?
This problem can be represented and modelled by set of linear equations. For example: Assume:
the number of days spent in Dubai is X.
the number of days spent in Ras Al-khaimah is Y.
the number of days spent in Fujairah is Z.
Then, the statement He had spent total of 8 days in visiting Dubai, Ras Al-khaimah and Fujairah, can be modelled as:
X + Y + Z = 8
And so forth, then you will end up with system of linear equations; particularly:
X + Y + Z = 8
X - Y - Z = 0
750X + 550Y + 650Z = 5400
Your target now should to solve this system of linear equations using Gaussian Elimination technique .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
