Hi everybody,
i´m new in programming and doing a self study in C prgramming, i dont really find it easy, i came a cross a problem which i cant solve ...can anybody explain how i go abt the following programm pls;
Read a positive integer value, and compute the following sequence: If
the number is even, halve it; if it's odd, multiply by 3 and add 1. Repeat
this process until the value is 1, printing out each value. Finally print
out how many of these operations performed?
how do i solve this problem, using the following statements;
1- If statement
2- While Statement
3- For statement