# 語句覆蓋測試 #### 原始碼結構：

• 輸入兩個值，如a = 0和b = 1。
• 計算出這兩個值的總和。
• 如果總和大於0，則列印「這是正結果」。
• 如果總和小於0，則列印「這是負結果」。
``````input (int a, int b)
{
Function to print sum of these integer values (sum = a+b)
If (sum>0)
{
Print ("這是正結果")
} else
{
Print ("這是負結果")
}
}
``````

``````print (int a, int b) {
int sum = a+b;
if (sum>0) {
Print ("這是正結果")
} else
{
Print ("這是負結果")
}
}
``````

``````Total number of statements = 7
Number of executed statements = 5
`````` ``````Statement coverage = 5/7*100
= 500/7
= 71%
`````` ``````print (int a, int b) {
int sum = a+b;
if (sum>0)
print ("這是正的結果")
else
print ("這是負的結果")
}
``````

``````Total number of statements = 7
Number of executed statements = 6
`````` ``````Statement coverage = 6/7*100 <br>
= 600/7
= 85%
``````
{"ft_lang_label":"__label__zh","ft_lang_prob":0.91719484,"math_prob":0.999248,"size":1253,"snap":"2020-45-2020-50","text_gpt3_token_len":1179,"char_repetition_ratio":0.117694154,"word_repetition_ratio":0.32846716,"special_character_ratio":0.2793296,"punctuation_ratio":0.03508772,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9994653,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12],"im_url_duplicate_count":[null,1,null,1,null,1,null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-31T22:34:16Z\",\"WARC-Record-ID\":\"<urn:uuid:feb08450-ffdc-4c8b-b722-b8f4e7bc5d6c>\",\"Content-Length\":\"15723\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:729bcb77-82f3-4a64-a4c6-18f50f8a8c6e>\",\"WARC-Concurrent-To\":\"<urn:uuid:d012e61a-4860-45d5-a8bb-4f9dc67bf684>\",\"WARC-IP-Address\":\"104.24.117.246\",\"WARC-Target-URI\":\"http://tw511.com/24/276/9949.html\",\"WARC-Payload-Digest\":\"sha1:GHXBQCGMZG72ECHPGLHVSH5BZ5YFHWNH\",\"WARC-Block-Digest\":\"sha1:QB2QYQCVKXSXAUVM7UY7SMMSDJN7433V\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107922463.87_warc_CC-MAIN-20201031211812-20201101001812-00388.warc.gz\"}"}