The purpose of this question is to introduce you to the concepts of arrays, subroutines, and functions. You have to develop three subroutines and one function. In the main program, you have to do the following things.
1. 3,2,3 that is k=3, m=2, n=3 -------------- 2. Matrix A Matrix B ========= ========= 1 0 1 2 4 2 3 0 0 0 4 3
If you e-mail me your program with out output : -5 marks
If you e-mail me you program or your output more than once : -2 marks
Write a C program that converts an integer number called DATA from base BASE to decimal. The two numbers DATA and BASE have to be read from the input. First, your program must check if BASE is a valid number or not. BASE is valid if and only if it is less than 10. Then, your program has to check if the number DATA is valid within the base BASE. DATA is valid within BASE only if each of the digits of DATA is less than BASE. If both input values are ok, then your program converts the number DATA from base BASE to base 10 (i.e. decimal). Otherwise, your program must print an appropriate error message.
Example1, If you read 452 5 then your program must respond: Invalid number Data = 452 within BASE = 5. Example2, If you read 452 -5 then your program must respond: Negative base Base = -5 is Invalid. Example3, If you read 452 11 then your program must respond: FromTo base BASE = 11 greater or equal 10 (i.e. decimal) is invalid. Example4, If you read 452 8 then your program must respond: Answer = ......