+ 3
How can i do it ?
How can i get a line including numbers that are seperated by '-' and then calculate sum of the numbers? Point is if '-' gonna be received so i have to use char but then how can i calculate the sum??
1 Odpowiedź
0
Refer this site it may be helpful to you.
https://www.geeksforgeeks.org/calculate-sum-of-all-numbers-present-in-a-string/