Thread: Help with loops

  1. #1
    Registered User
    Join Date
    Oct 2013
    Posts
    1

    Lightbulb Help with loops

    I just started studying programming and I simply can't figure out the loops
    I need to write a program using loops for this problem:
    From standard input characters are being read(from some text that consist of different characters) until the character dot is read. In this text there are couple of hidden non-zero numbers (less than 100). Make a program that will read all those characters and will print the sum of all the hidden numbers on the standard output.
    Sample input:
    Weiur23j sdlkj22lkadad 21kjs 20sdkjsd.
    Sample output:
    86


    Can anyone please help me?

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    What have you tried so far? Please post your best attempt using code tags, and you will likely receive good input. Also, don't expect a complete solution to your problem (read the homework policy if you haven't already).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. converting for loops to while loops
    By nabhatt in forum C Programming
    Replies: 3
    Last Post: 02-16-2012, 09:45 PM
  2. Replies: 3
    Last Post: 06-01-2011, 04:19 PM
  3. loops, menu loops
    By gloworm in forum C Programming
    Replies: 17
    Last Post: 04-12-2010, 07:59 PM
  4. Loops
    By Carp in forum C Programming
    Replies: 3
    Last Post: 03-14-2004, 07:56 PM
  5. Cin in while loops
    By chrismax2 in forum C++ Programming
    Replies: 2
    Last Post: 03-09-2004, 06:57 PM

Tags for this Thread