1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
timurjin [86]
3 years ago
8

Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive.

after the loop terminates , it prints out, separated by a space and on a single line, the sum of all the even integers read and the sum of all the odd integers read. declare any variables that are needed. assume the availability of a variable , stdin, that references a scanner object associated with standard input.
Computers and Technology
1 answer:
zysi [14]3 years ago
5 0
Procedure SumEvenOdd(stdin: array [0..100] of integer)
var
   i, sum_even, sum_odd: integer;

begin
   for i := 0 to 100 do begin
       if stdin[i] < 0 then
           break;
       if stdin[i] mod 2 = 0 then //even number
          sum_even := sum_even +  stdin[i]
       else 
          sum_odd := sum_odd +  stdin[i]; 

       ShowMessage('sum of even is ' + IntToStr(sum_even) + ' ' + 'sum of odd                                  is' + IntToStr(sum_odd) ) ;
   end; 

end
You might be interested in
2. A body is thrown vertically<br>100 m/s Theme taken to retum​
kondaur [170]

Answer:dead man lol roffle

Explanation:Not a gamer moment

6 0
3 years ago
"Which NET command is used on a Windows PC to establish a connection to a shared directory on a remote server?"
Advocard [28]

Answer:

The Tracert command

Explanation:

The tracert command was created to examine the path that packets take as they cross a network and can resolve a hostname by automatically querying a DNS server. The net command is used to manage network computers, servers, printers, and network drives.

6 0
3 years ago
You are looking at computer ads. One has a processor that is 3.64GHz. What does this mean?
aliina [53]

Answer:

The higher the clockspeed the more the cpu can do

Explanation:

8 0
3 years ago
___ are controls through which a user can enter input data in a gui application. answer
BaLLatris [955]
Digital data<span>. Biometric </span>data<span>. Digital </span><span>data</span>
5 0
3 years ago
Assignment
Lena [83]

Answer:

it

is

not

a

big

question

it

is

so

simple

5 0
3 years ago
Other questions:
  • A size of a jumbo candy bar with rectangular shape is l x w x h. Due to rising costs of cocoa, the volume of the candy bar is to
    9·1 answer
  • What is the difference between deta security and privecy ?
    12·2 answers
  • Which skill refers to the ability to visualize and implement possible business solutions to problems?
    6·1 answer
  • The _________ unit, within the CPU, interprets software instructions and literally tells the other hardware devices what to do,
    5·1 answer
  • Anyone know the answer I need help
    12·1 answer
  • Fire Tint, Inc., (FTI), applies tint to airplane canopies (front windows) manufactured by other companies. When the canopy manuf
    12·1 answer
  • Consider a disk that rotates at 3600 rpm. The seek time to move the head between adjacent tracks is 2 ms. There are 32 sectors p
    5·1 answer
  • Is this even possible
    9·2 answers
  • Can i eat chicken and you shut
    14·2 answers
  • 19. List three things you can do to protect your online reputation:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!