Question: Instructions: a) Use scanf function to accept the input from the user. b) Use floating point inputs wherever possible c) Need hard copy of (i)

Instructions: a) Use scanf function to accept the input from the user. b) Use floating point inputs wherever possible c) Need hard copy of (i) source code and (ii) output for each program. Write C programs to do the following: 1. Linear interpolation problem: From Table 1, find the freezing point temperature for a salinity value of 33 using linear interpolation. Also plot the salinity value vs freezing point temperature. Use Excel to plot. Table 1: Salinity as a function of Freezing temperature Salinity Freezing Temperature (F) 0 32.0 (fresh water) 10 20 24.7 30 35 31.1 30.1 29.6 29.1 28.6 2. Compute a linear model for time and temperature using Table 2. Any linear model is of the form y = mx + b (here y is temperature and x is time) Plot the linear model (on y axis you must have Temperature and on the x axis you must have Time) Use Excel to plot. Table 2: Temperature as a function of Time. Time (sec) Temperature (F 0.0 20.0 60.0 68.0 77.0 110.0 0.0 2.0 3.0 4.0 5.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
