Search:

Type: Posts; User: ktype

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    925

    its a 2 d array

    its a 2 d array
  2. Replies
    5
    Views
    925

    im not trying to print the coordinates. ...

    im not trying to print the coordinates.



    printf("What are the first coordinates for destroyer:\n");
    scanf("(%d, %d) (%d, %d)", &destroyer_1, &destroyer_2, &destroyer_3, &destroyer_4);
    ...
  3. Replies
    5
    Views
    925

    Entering in coordinates.

    Night now I'm working on part of a function that scans in two sets of coordinates. Is there a way I can scan both sets of coordinates in with the same scanf?
    ex. scanf("%d%d%d%d," &destroyer_1,...
  4. Battleship program. Randomly place ship function help

    Here is my battleship program I'm working on (player v computer); I'm having a lot of trouble with writing a function to randomly place the computers ships... and I'm not sure if my...
  5. Replies
    2
    Views
    3,007

    alternating players

    So I'm working on several 2v2 programs like tic-tac-toe, connect four and battleship. Generally what would be the best way to alternate players?
  6. Replies
    5
    Views
    5,464

    Program to generate a random sentence

    so I'm creating a program that generates random sentences with structs but i need some help... I'm trying to use structs and and create 4 different groupings article, noun, verb, and preposition....
  7. Replies
    2
    Views
    6,388

    pointers for a prime function?

    i'm trying to determine if a number from a file is a prime number using pointers first I wrote a function that determines if the number is a multiple of 7, 11, or 13. Then i wrote a function to see...
  8. Replies
    5
    Views
    1,953

    Calulation prime number, using loops

    how would I write a while() loop that calculates the sum of all prime numbers from 1 - 50.
  9. Help writing a function that tests if a number is a multiple of another.

    How would I write a function that determines if a number is a multiple of another number.
    ex. (is 147 a multiple of 7?)
Results 1 to 9 of 9