Computer Science, asked by msrujana3115, 1 month ago

Write a program to input 5 numbers and display sum of odd numbers entered by the user using for loop in Q-Basic​

Answers

Answered by VishuJangra
0

Answer:

Let the user enter 50 numbers.

Loop through each number and check whether each number entered is either even positive or odd negative.

If they are even positive, add its value to SUM1 (Just a variable for storing the sum of even positive numbers)

If they are odd negative, add its value to SUM2 (Another variable for storing the sum of odd negative numbers)

Display the sums i.e. SUM1 and SUM2

I hope that makes the problem simpler.

Attachments:
Similar questions