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
Read the following code carefully and do as directed: int main() { // Initialising starting number int num = 1; int n=7 // Outer
Wittaler [7]

Answer:

81

Explanation:

12734

4 0
3 years ago
Energy requirements of analog and digital signals.
jek_recluse [69]
Analog signals require more energy.

Analog=Constant flowing modulated

Digital is bursts of on/off binary data.
8 0
3 years ago
Read 2 more answers
The best way for employees to improve their skills online is to enroll in a digital
Maksim231197 [3]

The best way for employees to improve their skills online is to enroll in a digital office.

office.

<u>Explanation:</u>

In the present innovation-driven world, upskilling is turning out to be progressively significant just in light of the fact that innovation changes so quick.

A key preferred position for workers in web-based learning is that representatives can finish their preparation voluntarily and as indicated by their own timetables.

Enrolling in a digital office would allow an individual to learn at their ease, pace and comfort. It will definitely help the individual to expand and acquire skills.

So now full-time workers or the individuals who essentially don't have the opportunity to return to college full-time have a lot of chances to discover low maintenance courses.

6 0
3 years ago
Read 2 more answers
WNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOW
beks73 [17]

Answer:

yes.

Explanation:

7 0
2 years ago
Once a manual is written, it may change over time as procedures change. What's a recommended format for a manual to incorporate
zhenek [66]

Answer:

Print the manual in a loose leaf binder so even small changes can be replaced

Explanation:

Procedure  manual is the document that contains the business policies and strategies. These strategies can be changed time to time in the interest of company.

As these policies or procedures changes, it is necessary to communicate with all employees. To communicate this updated information to all employees it is necessary to print all that pages, where the changes have been made to replace them in the current manual. If we print whole manual it may increase the cost of printing. To reduce printing cost and wastage of pages only print those particular pages that have been changed. This will help to communicate to the existing employees as well  as to newly hired employees.

3 0
3 years ago
Other questions:
  • .) Write a complete C program in one file which takes a double value from the user, cubes it, and prints the result. Your progra
    10·1 answer
  • Which tool allows multiple users to dynamically update a document at the same time? Question 3 options: Google Docs OneDrive Exc
    14·1 answer
  • Why is it important to respect other political opinions
    7·2 answers
  • Nate wants to copy the style of his contact address to the normal template. Complete the paragraph to describe how he can access
    6·1 answer
  • How many times would the following loop iterate?
    15·1 answer
  • If the user enters any operator symbol other than , -, *, or /, then an UnknownOperatorException is thrown and the user is allow
    8·1 answer
  • Explaio mode of Operation of x-ray​
    15·2 answers
  • Any device that uses light to read and write information.
    9·2 answers
  • There is a surplus of scientific researchers for a vaccine. This means the demand for this career has
    8·2 answers
  • How can you create a messages to look like an IMessage?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!