Thread: alternate for loops? possible?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Registered User
    Join Date
    Oct 2006
    Posts
    50
    Thank you, everyone. Actually, I am attempting an exercise of array. It has to be 2 unknowns. Whether any 1 of the content of the array is excess or not is not important here. The code is like this:
    Code:
    int array1[10],array2[10];
    
    //user input size1(0-10) of array1
    
    //user input a list of integers to array1(no.  of integers=size1)
    
    //user input size2(0-10) of array2
    
    //user input a list of integers to array2(no.  of integers=size2)
    
    //display the content of array1 & array2 alternately
    If I use 1 unknown and any 1 of the arrays has empty content, wrong code will be output.

    This is the screenshot of the unwanted output and only 1 unknown is used here:

    http://img213.imageshack.us/img213/5849/unwantednw8.jpg

    If the empty content can be prevented from being displayed, then 1 unknown is enough but I just have no idea.
    Last edited by Roy01; 10-18-2006 at 07:36 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alternate Languages in C++
    By Kadell in forum C++ Programming
    Replies: 5
    Last Post: 07-03-2007, 04:35 AM
  2. alternate rendering loop
    By psychopath in forum Game Programming
    Replies: 2
    Last Post: 07-16-2005, 12:30 PM
  3. Alternate energy sources
    By Govtcheez in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 02-02-2005, 07:07 PM
  4. alternate to string.data()
    By Eber Kain in forum C++ Programming
    Replies: 1
    Last Post: 06-07-2004, 12:59 PM
  5. alternate function to sprintf
    By Eber Kain in forum C++ Programming
    Replies: 5
    Last Post: 12-27-2002, 10:38 PM