Question: in C Put all code in main, functions not desired Read a number from the user Based on the input value do the following: if
in C
Put all code in main, functions not desired
-
Read a number from the user
-
Based on the input value do the following:
-
if the number is less than 1, terminate
-
double it
-
square it
-
is the number even or odd
-
using for, while, and do loops
-
count from 1 up to it
-
count down to 1
-
-
Make sure you handle all initializations for each section
-
-
Submit: to quiz; youll have 5 minutes on quiz once you begin; paste the code into the quiz. So make sure your code is complete before you open the quiz.
Review2 Assignment:
Write these 4 functions. Develop a main() to test them
Name: triple
Parameters: integer value
Return: integer value
Purpose: triple the input value and return the result
Sample: if you pass in 5, the result would be 15
Name: biggest
Parameters: 3 integer values
Return: integer value
Purpose: return the largest value in the list
Sample: if you pass in (5,8,3) the biggest is 8. If you pass in (9,2,9) the biggest is 9.
Name: aval
Parameters: integer value
Return: integer value
Purpose: produce the absolute value of the parameter
Sample: Pass in 4, you get 4. Pass in -17 you get 17
Name: round5
Parameters: integer value (dont worry about negative numbers)
Return: integer value
Purpose: round the number to the closest multiple of 5
Sample: pass in 37 the result is 35; pass in 44 the result is 45
Notes: include a couple sentences explaining your solution. Using Google is completely inappropriate.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
