Write an Algorithm to find the summation of positive (+ve) and negative (-ve) values for 100 numbers. Solution: 1-Start 2- Let initial value of the summation equals to zero(Sp-0, Sn-0) 3- Let the...


Write an Algorithm to find the summation of positive (+ve) and negative (-ve) values for<br>100 numbers.<br>Solution:<br>1-Start<br>2- Let initial value of the summation equals to zero(Sp-0, Sn-0)<br>3- Let the initial value of the counter equals to zero(1-0)<br>4- Increase the value of the counter by one (1-I+1)<br>5-Read the value of X<br>6-Check that if X>0, then Sp-Sp-X<br>7- Check that if X<0, then Sn-Sn+x<br>8- Check that if K100, then return to step 4<br>9-Print the value of Sp and Sn<br>10-End<br>

Extracted text: Write an Algorithm to find the summation of positive (+ve) and negative (-ve) values for 100 numbers. Solution: 1-Start 2- Let initial value of the summation equals to zero(Sp-0, Sn-0) 3- Let the initial value of the counter equals to zero(1-0) 4- Increase the value of the counter by one (1-I+1) 5-Read the value of X 6-Check that if X>0, then Sp-Sp-X 7- Check that if X<0, then="" sn-sn+x="" 8-="" check="" that="" if="" k100,="" then="" return="" to="" step="" 4="" 9-print="" the="" value="" of="" sp="" and="" sn="">

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here