Answer to Question #305935 in C++ for Tig

Question #305935

Write pseudo code for the problem of printing odd numbers less than a given number it should also calculate their sum and count


1
Expert's answer
2022-03-04T02:15:39-0500

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



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog