{"id":10727,"date":"2021-12-06T10:14:18","date_gmt":"2021-12-06T10:14:18","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=10727"},"modified":"2021-12-06T10:15:00","modified_gmt":"2021-12-06T10:15:00","slug":"batch-percentage-help","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-percentage-help\/21352.html","title":{"rendered":"Batch Percentage Help"},"content":{"rendered":"<p>Hello,<br \/>\nI need some direction in how to get the percentage of two variables in batch. The problem im having is that decimal values less than 0 return a 0 making it impossible to calculate the percentage, or am i just missing something?<br \/>\n_____________________________<br \/>\n@echo off<br \/>\nset intx=0<br \/>\nset inty=100<br \/>\nset intz=25<br \/>\nset \/A intx=(%intz%\/%inty%)*100<br \/>\necho percentage is %intx%%<br \/>\necho.<br \/>\npause<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":3},"question-category":[55],"question_tags":[],"class_list":["post-10727","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/10727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=10727"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=10727"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=10727"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=10727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}