Suppose that we have a decimal number x and we only need to


PLEASE HELP WITH C++

Suppose that we have a decimal number x and we only need to find the number of twos, ones and zeros in its equivalent ternary number.

Write a porgram that

for 5 consecutive times:

1. asks the user for the value of x

2. finds the number of zeros and ones and twos

3. displays number_of_twos, number_of_ones and number_of_zeros

Hint: instead of storing the equivalent ternary numbers in arrays, you can use three counter variables to count the number of twos, ones and zeros.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Suppose that we have a decimal number x and we only need to
Reference No:- TGS02889360

Expected delivery within 24 Hours