Question: Question 1: 15 marks Write a complete C-program with a programmer-defined FUNCTION to calculate the interfacial energy between surfaces A and B, known as G.
Question 1: 15 marks Write a complete C-program with a programmer-defined FUNCTION to calculate the interfacial energy between surfaces A and B, known as G. The main program reads (prompts user) the surface energy of A (GA) and the surface energy of B (GB). Upon execution of the program, the interfacial energy between surfaces A and B. G has to be displayed with 5 decimal points. The programmer-defined FUNCTION is to be named GAMMA. Note: G = GA +GB - 2VGA.GB Question 2: 15 marks The friction force. F measured for a ball sliding on a rigid flat surface at different normal loads, Nare given below: Case 1 2 3 4 Normal load, N (N) 10.0 20.0 30.0 40.0 Friction force, F (N) 2.5 4.2 6.1 9.3 Write a complete C-program to compute and to display the coefficient of friction, CF for each of the data given above with 3 decimal points. The normal load, N and friction force, F and the coefficient of friction, CF MUST be stored in ONE-DIMENSIONAL ARRAYS. The main program also needs to show the assignment of values to the input variables. It is assumed that the friction force follows Coulomb's friction law, where F = CF XN
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
