Question: i need #6 but i believe #6 function needs to call #5 function. I would like this in C language, and have no pointers, arrays
i need #6 but i believe #6 function needs to call #5 function. I would like this in C language, and have no pointers, arrays or strings (on function calling and parameters). Thanks! I have attached the other functions that you might need to call for function 6
1. Write and test a function called is_multiple_of that takes a integer n1, integer n2 and determines whether the second argument (n2) is a multiple of the first argument (n1). The function should return 1 if n2 is a multiple of n1, and 0 if it is not. Examples: If the function is called with 2 (n1) and 6 (n2), the function should return 1 because: 6 is a multiple of 2, since 2 divides evenly into 6 If the function is called with 4 (n1) and 6 (n2), the function should return 0 because: 6 is not a multiple of 4 since 4 does not divide evenly into 6. HINT: How do you determine if one number divides evenly into another? What could we do to test to see if a number was even (divisible by 2?)
2. As illustrated in the image to the right, quadrants of a grid are numbered counter clockwise with the upper right quadrant numbered I. A grid has a y-axis and x-axis and where the two intersect is the origin. A point lying on an axis is not considered within a quadrant. Write a function called get_quadrant takes 2 whole numbers representing an (x,y) point of a grid and returns the number of the quadrant that point lies in. If the point lies on an axis, the function should return -1 to indicate it does not lie in a quadrant.
3.Write and test a function called print_zodiac_sign that will take as arguments two numbers: one for the month and one for the day. The function should print the name of the zodiac sign for the specified month and day (you are not printing the image). You can assume the function will be called with values that represent a valid date (ie. you will never get the value 2, 30 as there is no February 30th.
4. Write and test a function called get_seconds that takes three numbers representing a number of days, number of hours and number of minutes. The function should compute and return the number of seconds this amount of time would be in total. Examples: If the function is called with 0 days and 0 hours and 1 minute, the function should return 60 If the function is called with 0 days and 2 hours and 1 minute, the function should return 7260 If the function is called with 1 day and 1 hour and 1 minute, the function should return 90060
5. Write and test a function called print_time_conversion that takes one integer representing a number of seconds. The function should print convert the given number of seconds to the amount of time in days, hours, minutes and seconds. The function should then print the result in the this format: W days, X hours, Y minutes, 2 seconds where W. X, Y and Z are the number of days, hours, minutes and seconds respectively. Examples: If the function is called with 60 seconds the function should print: 0 days, 0 hours, 1 minutes, 0 seconds If the function is called with 7260 seconds the function should print: 0 days, 2 hours, 1 minutes, 0 seconds If the function is called with 90070 seconds the function should print #dager hos minutes, 10 secondo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
