Can you write a program for adding 10 numbers?

Can you write a program for adding 10 numbers?

This inquiry, despite the fact that appears like a straightforward expansion of 10 numbers, can be somewhat intricate looking at the situation objectively. This is on the grounds that the span of the number isn’t determined. In what capacity will you pronounce the factors that are expected to store these numbers?

For effortlessness, let us consider expansion of two numbers. This will as a rule incorporate the accompanying three stages:

int firstNumber = some number;

int secondNumber = some number;

int whole = firstNumber + secondNumber;

Here I utilized int thinking the info esteem can be contained utilizing the datatype int. Nonetheless, if the measure of the information number is more than that of an int, it wont work. Same will occur with other normal datatypes. Imagine a scenario in which I enter a number took after by hundred thousand zeros.

In this way, There are two ways you can think about noting this inquiry:

Expecting the contribution to be reasonable by information composes you can make a circle that emphasizes 10 times and continue including the numbers that were already put away by indicating the right information writes.

On the off chance that the extent of the information number isn’t known and on the off chance that you can expect a huge number, you should be more imaginative. Perhaps utilize a string to get the information numbers, include them character by character and putting away the outcome in a string or something to that effect. There will be preferable routes over this. Simply something that went ahead the highest point of my brain.

The most critical thing here is to not hop into conclusions and get every one of the prerequisites previously coding. Data like the dialect utilized, the cost, the desire and so forth. Excessively dubious an inquiry, making it impossible to answer exactly.