Question: URGENT PLEASE HELP ME C++ Program Please help me fix my program *Process command line arguments correctly. *Please use the source code given (its a
URGENT PLEASE HELP ME
C++ Program
Please help me fix my program
*Process command line arguments correctly.
*Please use the source code given (its a requirement) and add other code needed to achieve the output
Source Code
#include #include using namespace std; void update_sum( const char* s, double& strict_sum, double& lenient_sum, int& nValid, int& nInvalid, int& nPartlyValid); //try obtaining a valid number from string s //update strict_sum, lenient_sum, // nValid, nInvalid, nPartlyValid void adder_report(double strict_sum, double lenient_sum, int nValid, int nInvalid, int nPartlyValid); int main(int argc, char ** argv) { double strict_sum = 0.0; double lenient_sum = 0.0; int nValid=0; int nInvalid = 0; int nPartlyValid = 0; string s; if (argc > 1) { for (int i = 1; i THE PROGRAM SHOULD BE ABLE TO OUTPUT THE FOLLOWING:



Sample Program Runs DE C:\Windows\system32\cmd.exe C:\temp>add 2.3 -5.6 7.8 4.5 C:\tempada Type numbers to be added, 1 per line. Ctrl-Z to end input. 2.3 -5.6 7.8 z 4.5 C:\tenp). 01. C:\Windows\system32\cmd.exe C:\temp>add 2.3 -5.6 7.8n humber 7.8 with extra characters: n sum of valid itens: -3.3 sum including partly valid itens: 4.5 C:\temp>add Type numbers to be added, 1 per line. Ctrl-Z to end input. 2.3 --5.6 7.8n number 7.8 with extra characters: n sum of valid itens: -3.3 sum including part ly valid itens: 4.5 C:\temp>. 08. C:Windows\system32\cmd.exe C:\tenp>add a b c not valid: a not valid: b not valid: c no fully valid itens found C:\tenp>add Type nunbers to be added, 1 per line. Ctrl-Z to end input. a not valid: a D not valid: b c not valid: c Z no fully valid itens found C:\tenp> es. C:\Windows\system32\cmd.exe C:\tenp>add 2.3 a 5.6 b 7.8 C not valid: a not valid: b not valid: c sum of valid items: 4.5 C:\tenp>add Type numbers to be added, 1 per line. Ctrl-Z to end input. 2.3 a not valid: a -5.6 b not valid: b 7.8 not valid: c AZ sum of valid items: 4.5 C:\tenp> 6. C:\Windows\system32\cmd.exe C:\tenp>add 2.3a -5.65 7.80 number 2.3 with extra characters: a number -5.6 with extra characters: h number 7.8 with extra characters: c no fully valid items found sum including part ly valid itens: 4.5 C:\tenp>add Type numbers to be added, 1 per line. Ctrl-Z to end input. 2.3a number 2.3 with extra characters: a -5.6b number -5.6 with extra characters: b 7.8c number 7.8 with extra characters: c az no fully valid items found sum including part ly valid itens: 4.5 C:\tenp