Question: Write a program that reads numbers continuously until -9999 is entered. Then the program displays info about each value: v1: int part, dec part, sign
Write a program that reads numbers continuously until -9999 is entered. Then the program displays info about each value:
v1: int part, dec part, sign
v2: int part, dec part, sign ... etc
The program should use the following functions:
getIntPart(): that takes in one input and returns its integer part
getDecPart(): that takes in one input and returns its decimal part
getSign() : that takes in one input and returns its sign as a string which could be positive, negative, or neutral
I want it in C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
