Question: Write a C program that reads in (you can use scanf function in C) and converts any base 3 number to base 9 numbers and

Write a C program that reads in (you can use scanf function in C) and converts any base 3 number to base 9 numbers and prints them. Your program should notify the user if they enter an invalid base 3 number.

Base 3 numbers: 0,1 and 2

Base 9 numbers: 0,1,2,3,4,5,6,7 and 8

Example output:

Enter a base 3 number: 45

This is an invalid number is base 3 system. Please try again.

Enter a base 3 number: 211

The base 9 conversion for the number is 24

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!