Homework Help (Array loop?)

This is a discussion on Homework Help (Array loop?) within the C Programming forums, part of the General Programming Boards category; Hey, back again, trying to figure out how to make a mancala program. For the incrementing part of this program, ...

  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    14

    Homework Help (Array loop?)

    Hey, back again, trying to figure out how to make a mancala program. For the incrementing part of this program, I don't know how to write this function. I want to increment an array from x to y. If the number of times I'm incrementing is greater, the array has to loop back to x. Anyways to do this?
    Code:
    int P11(int x[]){	int i;	int j;	int num = 0;	x[2] = num;	x[2] = 0;		if(x[i] == x[7]){		continue;	return x[7];}
    This forum is squeezing all my stuff together for some reason.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    Try using "paste as text"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Homework Help (array)
    By IamTheCarter in forum C Programming
    Replies: 9
    Last Post: 10-14-2011, 08:51 PM
  2. Homework Help C Program Loop & Switch
    By 123456tacos in forum C Programming
    Replies: 7
    Last Post: 03-11-2011, 07:11 PM
  3. array homework
    By kokujampo in forum C Programming
    Replies: 4
    Last Post: 04-05-2010, 12:47 PM
  4. homework help. cant get for loop to count right
    By bluegoo06 in forum C++ Programming
    Replies: 11
    Last Post: 03-10-2005, 05:05 PM
  5. A while loop?? homework..tips please.
    By ftblstr2319 in forum C++ Programming
    Replies: 13
    Last Post: 03-26-2004, 07:31 AM

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