Thread: need help on array question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    11

    need help on array question

    Firstly, sorry for my poor coding skill, below code is what i trying right now, i planning to do 3 input for printing line ,after that loop, i wish to have 3 lines printed together which i trying it on second loop. I get stuck how to correct it, anyone can help me on this?


    Code:
    #include <stdio.h>
    int main()
    {
        int value[1000][3],k;
        int loops,value_line;
        
    for(loops=1;loops<=3;loops++)
        {
                
                scanf("%d",&k);
    
    
                if (k==1)
                {
                
                scanf("%d",&value[loops][1]);
                
                printf("\n");
        for(value_line=1;value_line<=value[loops[1];value_line++)
                        printf("* ");                                                
        }
    
    
    
    
        for(int kk=1;kk<=value[loops][0];kk++)
        {
            printf("\n");
        for(value_line=1;value_line<=value[loops][1];value_line++)
            printf("* ");    
        }
        
        printf("\n");
        return 0;
    }
    }
    Last edited by hian3359; 11-26-2012 at 06:31 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Array Question
    By Sorinx in forum C Programming
    Replies: 49
    Last Post: 11-16-2012, 08:07 AM
  2. Replies: 12
    Last Post: 11-21-2010, 09:46 AM
  3. question about the array in C
    By thungmail in forum C Programming
    Replies: 4
    Last Post: 11-07-2009, 01:37 PM
  4. Array Question...
    By tetraflare in forum C++ Programming
    Replies: 6
    Last Post: 11-25-2002, 03:01 PM
  5. array question
    By DocDroopy in forum C Programming
    Replies: 12
    Last Post: 07-28-2002, 06:24 PM