generating number triplets

This is a discussion on generating number triplets within the C Programming forums, part of the General Programming Boards category; hi there, i am doing a while command, and i need to generate like 3,4,5 4,3,5 5,12,13 12,5,13 6,8,10 7,24,25 ...

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    11

    generating number triplets

    hi there, i am doing a while command, and i need to generate like
    3,4,5
    4,3,5
    5,12,13
    12,5,13
    6,8,10
    7,24,25
    24,7,25
    8,15,17
    15,8,17

    those numbers like that using a while command. They are numbers that make a right triangle in case your wondering. but i have no idea how to create triplets of numbers or even how to make them generate right triangle values as they go down.

  2. #2
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    974

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Doxygen failing
    By Elysia in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 04-16-2008, 01:24 PM
  2. scanf oddities
    By robwhit in forum C Programming
    Replies: 5
    Last Post: 09-22-2007, 01:03 AM
  3. Prime number program problem
    By Guti14 in forum C Programming
    Replies: 11
    Last Post: 08-06-2004, 04:25 AM
  4. parsing a number
    By juancardenas in forum C Programming
    Replies: 1
    Last Post: 02-19-2003, 12:10 PM
  5. Random Number problem in number guessing game...
    By -leech- in forum Windows Programming
    Replies: 8
    Last Post: 01-15-2002, 04:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21