Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Re: c++ math problem
I thought you could use a command like cin.get although cin.get is for use with characters so I guess you can't use that but is there a way to isolate numbers in that manner (setw) or something like that?
by the way if you want to email me directly it's...
Re: c++ math problem
Thanks for the solutions guys but now I'm curious... is ther a possible way to divide a number like 117 into 3 digits (1, 1 & 7) and add them together (1+1+7) to get 9? in code that is.
c++ math problem
I need to make a program that takes a number like 117
and adds the individual digits together (1+1+7) which equals 9
and divides it by 9 to see if the number is divisable by 9
but I don't know how to isolate each digit in order to add them together.
Can anyone help me
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.