Programming Problem
Write and design pseudocode and flowchart that takes the number N and finds the sum of odd and even numbers from 1 to N and display the result on the screen.
Write and design pseudocode and flowchart that takes the number N and finds the sum of odd and even numbers from 1 to N and display the result on the screen.
Pseudocode
Start
Declare Integer i, num, oddsum, evensum
Assign oddsum = 0
Assign evensum = 0
Output "Sum of Odd and Even Numbers"
Output "Give the value of num :"
Input num
For i = 1 to num
If i % 2 = 0
Assign evensum = evensum + i
False:
Assign oddsum = oddsum + i
End
End
Output "Sum of all even numbers = " & evensum &"."
Output "Sum of all odd numbers = " & oddsum &"."
End
Stop
Algorithm
Step 1: Start
Step 2: Declare variables i, num, oddsum, evensum
Step 3: Input a value say num
Step 4: FOR i = 1 TO num
IF i % 2 = 0
evensum = evensum + i
ELSE
oddsum = oddsum + i
ENDIF
Step 5: DISPLAY evensum
DISPLAY oddsum
Step 6: END
Flowchart of Sum of Odd and Even Numbers
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com.