Question: rite a CH program to do the following: a Define a function called abs WithSign that takes two argument (int,char) and return the integer in
rite a CH program to do the following: a Define a function called abs WithSign that takes two argument (int,char) and return the integer in first argument with the same sign in second argument. if the sign was or else return the same integer: Do not use any pre-defined function o Example 1 abs WithSign (5,'-?) the returned value must be-5 Example 2 abs WithSign (-5,-) the returned value must be-5 O Example 3 absWithSign (5," +") the returned value must be 5 Example 4 absWithSign (-5,'+') the returned value must be 5 Define a function called printSeries that takes an integer n then print the summation of 1 the following series sum = In main, do the following:- o Read an integer option from user o If an option was 1, then read an integer number and call the function printSeries(int) 1 + + + 3 TI o If an option was 2, then read an integer number and a character and call the function abs WithSign(int,char) o If an option was 3, then read a number in bytes then convert it to bits 1 byte= 8 bits o If any other number was inserted print your name
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
