Question: Programming language is C 1. Develop a program to calculate a piecewise function. (10 points) 1 x20 y = f(x)= x 0 x=0 Input Specification:

Programming language is C 1. Develop a program to calculate a piecewise function. (10 points) 1 x20 y = f(x)= x 0 x=0 Input Specification: Input a decimal number (real number) for x Output Specification: Output the value of x and y. keep 5 decimal numbers. Seperate by',' Sample Input: 10.2 Sample Output: x=10.20000.y=0.09804 2.. Digit Statistics (10 Points) Given a positive integer, count how many times each different single digit appears. Input Specification: Positive integer. Output Specification: On each line, output D:M. Here, D is the digit, M is how many times D appears in the integer. D is in ascending order on different lines. Sample Input: 100811 Sample Output: 0:2 1:3 8:1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
