Write pseudo code for the problem of printing odd numbers less than a given number it should also calculate their sum and count
Input the limiting number, say Num
Initialize Count = 0 and Sum = 0
For n=0 to N
If n % 2 == 1 : Check for ODD number
Then
Sum = Sum + n and Count = Count +1
End the For loop
Display the Count and Sum
Comments
Leave a comment