100% Guaranteed Results


CSE114 – LABWORK RULES Solved
$ 24.99
Category:

Description

5/5 – (1 vote)

● Labwork ends 18.50.
● Name of your file should be in the format: labwork1_name_surname.c
○ Name: is your own name
○ Surname: is your own surname
○ Example: labwork1_name_surname.c
○ If you do not know how to create a c file, please look at “how to run your code” file
● Your file should be on the desktop
● At 18.50, we collect your works from your desktop. Do not turn off your computer until you are told to do so…
● You will not have an internet connection until we collect your works. When the access is permitted, submit your work on coadsys.
● The work we collect and you submitted on coadsys should be exactly the same.
● Read your labwork documents carefully and listen to the explanation of your assistant.
● There can be restrictions on your labwork, obey them if you want to get a full grade.
● If you did not understand the labwork or there is an unclear point, do not make assumptions and ask your assistant immediately.
● There will be some example input and output for each labwork. Do not write a program that only runs for the given example input. Be sure you understand the question well.
FORBIDDEN
● Talking with your friends
● Looking at your friend’s monitor
● Using any mobile phone or smart devices
● Books, notebooks, papers or notes
● Usb or any kind of device that is used to share information
● Internet
LABWORK 1
Write 3 functions and a main function.
Function 1: (25 pts)
● Function name: squared_diff1 ● Return type: integer 2 x y
● Function parameter: integer parameters; and
● Function calculates and returns 𝑥2 − 𝑦2, if the result is negative, then multiply it with -1.
Function 2: (25 pts)
● Function name: squared_diff2 ● Return type: integer 2 x y
● Function parameter: integer parameters; and it with -1. (𝑥 − 𝑦) * (𝑥 + 𝑦),
● Function calculates and returns if the result is negative, then multiply
The main function :
1. Ask and values from the user (5 pts)
2. Call squared_diff1 function and calculate its result.x y (5 pts)
3. If the result from step 2 is smaller than 20, ask another value from the user. Otherwise,
continue with step 6. (10 pts) y
5. If the result from step4 is also smaller than 20, then set the value to y . Otherwise, 4. Call squared_diff1 function again and calculate its result with the new value. (5 pts)
continue with step 6. (10 pts) y x+5
6. Call squared_diff2 function and calculate its result (5 pts)
7. Print “SAME” if both of the values returned from the functions match, print “DIFFERENT” otherwise (10 pts)
8. Do the printf and scanf operations only in the main function.

Reviews

There are no reviews yet.

Be the first to review “CSE114 – LABWORK RULES Solved”

Your email address will not be published. Required fields are marked *

Related products