Search:

Type: Posts; User: Kevin Nguyen

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    903

    bug with scanf and loops

    #include <stdio.h>

    int main()
    {
    int i;
    int a[1000];
    int x;
    int ret;
    int y;
    int ret2;
  2. a function which takes a character array and reverses it

    this was a question from my first exam and it says

    write a c function which takes a string(as a character array, null terminated) and reverses it. it doesn't print the reversed string -- it...
  3. Replies
    3
    Views
    702

    Quick question

    what does this mean?



    if(somenumber == 0)
    {
    blah blah
    }
    if(!(somenumber%2))
    {
  4. Replies
    12
    Views
    8,971

    so im trying to check the row if there's any...

    so im trying to check the row if there's any repeats in my hard coded function in my 3d array so for example, if a person wants to check the first sudoku set, they press 1 to check it, however my...
  5. Replies
    12
    Views
    8,971

    1 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 1 3 4 5 6 7 8...

    1 2 3 4 5 6 7 8 9
    2 3 4 5 6 7 8 9 1
    3 4 5 6 7 8 9 1 2
    4 5 6 7 8 9 1 2 3
    5 6 7 8 9 1 2 3 4
    6 7 8 9 1 2 3 4 5
    7 8 9 1 2 3 4 5 6
    8 9 1 2 3 4 5 6 7
    9 1 2 3 4 5 6 7 8
  6. Replies
    12
    Views
    8,971

    I have my sudoku array of 9x9 in character, is...

    I have my sudoku array of 9x9 in character, is there a way to convert the char sudoku array into int sudoku array assuming all the char is between '1'-'9'?
  7. Replies
    12
    Views
    8,971

    when im opening the file, do i need to extract...

    when im opening the file, do i need to extract from the .txt file and put it into an array to check if the input is valid? Or is there a simpler way?
  8. Replies
    12
    Views
    8,971

    help with sudoku checker

    So my program is to check if a certain 9x9 sudoku grid is valid. i have to get the input through command argument. so for example.

    ./a.out sudoku.txt

    So we have make my c program to use FILE...
  9. Replies
    9
    Views
    1,856

    heres what i have so far if i type in...

    heres what i have so far if i type in "3,4,5,4,4,5,6,6,e(to finish inputting numbers)" the distinct values should be 4, but i got 5. so im still off by 1.


    #include <stdio.h>


    ...
  10. Replies
    9
    Views
    1,856

    Here's what i have, when i get the total distinct...

    Here's what i have, when i get the total distinct values, it's now 19.... am i missing something that i don't see? i got my array sorted.


    //---------function to find the distinct values-------
    ...
  11. Replies
    9
    Views
    1,856

    would i need to make a 2nd array then?

    would i need to make a 2nd array then?
  12. Replies
    9
    Views
    1,856

    Help keeping a count of distinct values

    So this code I'm trying to calculate the number of distinct values entered into an array. If i enter the followings
    "3,4,5,6,7,7,6,e (anything that's not a number)"


    i get a total of 7 but in...
  13. I need help with my if statement / do statement

    Hello I need help with my code. Im suppose to use a "do statement"
    the user types in 1 to do an addition homework. it'll display an addition problem.

    If they get it right the first time, the...
  14. so what do i exactly do then? sorry this is...

    so what do i exactly do then? sorry this is really bothering me.
  15. Need help finding the minimum value of an array

    hello everyone so im trying to make my program read a bunch of numbers in an array to find its maximum and minimum. the program will ask the user to enter in as much number as possible until they...
Results 1 to 15 of 15