I have answered the question below.
Code:
Sub program()
Dim firstNum, secondNum, i, n As Integer
firstNum = InputBox("Enter firstNum: ")
secondNum = InputBox("Enter secondNum: ")
If firstNum < secondNum Then
n = secondNum - firstNum - 1
Dim odd_sum, even_sum As Integer
odd_sum = 0
even_sum = 0
For i = firstNum + 1 To secondNum - 1
If i Mod 2 = 0 Then
msg1 = msg1 & i & vbTab
even_sum = even_sum + i
Else
msg2 = msg2 & i & vbTab
odd_sum = odd_sum + i
End If
Next i
MsgBox "Even Numbers between " & firstNum & " and " &
secondNum & ":" & vbTab & msg1 & vbNewLine
MsgBox "Sum of Even numbers: " & even_sum & vbNewLine
MsgBox "Odd Numbers between " & firstNum & " and " &
secondNum & ":" & vbTab & msg2
MsgBox "Sum of Odd numbers: " & odd_sum & vbNewLine
Else
MsgBox "firstNum should be less than secondNum"
End If
End Sub
Snapshot of the code with explanation in comments:

Sample Output:





If you have any doubts feel free to ask me in comments,
Thank you, Have a nice day..!!
write the program in VBA b. Write a program that uses a For loop to perform...
I have to write a program in java which uses while loops. 1.prompt the user to input two intergers: firstnum ans second numnumber. (first number must be smaller that the second number). 2. Output all the even numbers between first number and second number inclusive. 3. Output the sum of all the even number between first number and second number inclusive. 4 Output all the odd numbers between first number and second number inclusive. 5. Output the sum of all...
Use a java program that does the following:
. (10 points) Write a program as follows a. Prompt the user to input two positive integers: nl and n2 (nl should be less than n2) b. If the user enters the negative number(s), convert it/them to positive number(s) c. If nl is greater than n2, swap them. d. Use a while loop to output all the even numbers between nl and n2 e. Use a while loop to output the sum...
Write a Java program to prompt for inputting an integer N, then enter N integers (a loop is needed), print the numbers user entered, and the amount of even and odd numbers (zero is even number). (1) Prompt for the user to input an integer and output the integer. (1 pts) Enter an integer: You entered: 5 (2) Prompt for the user to input N integers, output the numbers entered and the amount of even and odd numbers (9 pts)...
Write a complete Java program that uses a for loop to compute the sum of the even numbers and the sum of the odd numbers between 1 and 25.
Write a Python named numbersread.py that uses a loop to read and process numbers.txt. The program should output all of the integers, one per line, and then output the total of the even integers and the total of the odd integers.
Write a C++ program that asks the user to enter a single number from 1 to 50 and a choice of "even" or "odd". Using a recursive function, output the sum of all the even or odd integers from 1 up to (and including) that number. Your program does not need to loop and accept more input (only one input of the number then even/odd).
using c++ write a program that reads numbers from the user until the user enters a Sentinel. Use a Sentinel of -999. Ignore all negative numbers from the user input. Do the following: must use loops and numbers to do this 1. Output the sum of all even numbers 2. Output the sum of all odd numbers 3. Output the count of all even numbers 4. Output the count of all odd numbers
1. (sumFrom1.cpp) Write a program that will ask the user for a positive integer value. The program should use the for loop to get the sum of all the integers from 1 up to the number entered. For example, if the user enters 50, the loop will find the sum of 1, 2, 3, 4, ... 50. If the user enters a zero or negative number, a message should be given and the program should not continue (see Sample Run...
python
la ab X, X Lab 7 Design and implement a Python program that uses a while loop and selection statements to print the sum of the even numbers and the sum of the odd numbers (all integers) read from the keyboard. The sequence of numbers ends with a negative number: So, all numbers considered for printing the two sums are greater than or equal to 0. The sequence may be empty. Here is a possible interaction. Enter an integer:...
Write a VBA Sub Program to perform matrices multiplication of matrix A and B using 2D arrays. a. Get the number of rows and columns of both matrix A and B from the user, and check if multiplication is possible with matrix A and B. b. If matrices multiplication is possible, input the matrix A and B using arrays and multiply matrix A and B.