Skip to content

Commit

Permalink
Documention fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleeplessy committed Dec 12, 2016
1 parent cbaa44f commit 911d097
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ scientific notation digits string.
## Example
<pre>
std::string NumStr = "1024.96";
SN_NUMBER MyNum1(NumStr), MyNum2("123456"),MyNum3("12a3445");
SN_NUMBER MyNum1(NumStr), MyNum2("123456");
std::cout << "MyNum1:" << MyNum1 << std::endl;
std::cout << "MyNum2:" << MyNum2 <<"Number of digits: "<< MyNum2.NDIGIT() << std::endl;
std::cout << "MyNum3:" << MyNum3 << std::endl;</pre>
SN_NUMBER MyNum3("12a3445");
</pre>

*The Outputs would be:*
<pre>Error info: Some of the inputs is not digit.
<pre>
MyNum1:1.02496E3
MyNum2:1.23456E5 Number of digits:6
MyNum3:1.2a3445E6</pre>
Error info: Some of the inputs is not digit.
</pre>



# Functions
Expand Down
4 changes: 2 additions & 2 deletions example/Example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include"../src/Scientific_Notation.h"
int main() {
std::string NumStr = "1024.96";
SN_NUMBER MyNum1(NumStr), MyNum2("123456"),MyNum3("12a3445");
SN_NUMBER MyNum1(NumStr), MyNum2("123456");
std::cout << "MyNum1:" << MyNum1 << std::endl;
std::cout << "MyNum2:" << MyNum2 <<"Number of digits: "<<MyNum2.NDIGIT() <<std::endl;
std::cout << "MyNum3:" << MyNum3 << std::endl;
SN_NUMBER MyNum3("12a3445");
return 0;
}

0 comments on commit 911d097

Please sign in to comment.