Advertisement
a3f

Prob. 1, P No. 249

a3f
Mar 17th, 2012
2,878
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM By Ahmed Fatoum
  2. INPUT "Enter number count ?"; n
  3. for i = 1 to n
  4.  
  5.     input elraqam
  6.  
  7.     if elraqam > 0 then 'mogab
  8.         mogab = mogab + elraqam
  9.         mogabCount = mogabCount+1
  10.     end if
  11.     if elraqam < 0 then 'saleb
  12.         saleb = saleb + elraqam
  13.         salebCount = salebCount+1
  14.     end if
  15. next i
  16.  
  17. print "Out of ";n; " numbers, we found "; mogabCount; " positive numbers (adding to "; mogab; ")"
  18. print "and "; salebCount; " negative numbers (adding to "; saleb; ")"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement