How can I create a code for this task?
*You are given a natural number m and natural number n =2, .,.,.. 16. Print the number m in counting system with base n.
Please provide more detail on the question. I'm not sure what's going on with the .,.,.. in the middle of the question, so please explain that. Furthermore, you must show effort (ie. your current code), before we will help.
there are numbers from 2 till 16.
I don't have a code. I can't understand how to start, how to build it.
I'm not stupid, by the way. this task is too complicated for me.
Well if you could explain what you have to do, we could help you out.
I have to build the working code for program in c++. If I have a natural number m and natural number n=2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16. My program should print the number m in counting system ( binary system, decimal system, hexadecimal system, octal system and in other not named systems, which have base like 3, 5, 6...etc.) with that base n.
OK. Do a google search for how to convert numbers to binary, hex, octal and so on.
I have done it, but it do not help me in building that code. I understand how to convert numbers on paper, but how to create a program, which will do it...?
Maybe you should check out some basic C++ tutorials. If you could write out the logic in words, I would be able to give you some tips as to where you could go to learn the various bits and pieces :)
ok. I will be back tomorrow.
In order to solve a problem successfully, you must first understand what it is.
One way to test your understanding is to solve a simple version of it by hand, without using a computer.
So... m = 13, n = 241. In other words, what is the base-13 representation of 241?
I'm going to guess that your answer will be "I don't know." If that's true, no code that anyone writes will help you, because the best you can hope for is a solution to a problem that you still don't understand, and from which you will therefore learn nothing.
You are required to write a program which will take input from user in two integer arrays. The program should compare both arrays for checking if both arrays are totally identical (Exactly same). If not, then program should determine the matching indexes of both arrays. Matching indexes means that first element of array1 should be equal to first element of array2 and so on.