Search:

Type: Posts; User: nafix

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,292

    Thanks for the responses, makes sense now. This...

    Thanks for the responses, makes sense now. This code was for an embedded platform of which I do not know any details, so it's very hardware specific. I will be porting it to a different...
  2. Replies
    10
    Views
    1,292

    Syntax Question for Array in C

    Hello. I'm working on a project where I have to use someone's code. I know what this block of code does, I need help with the actual syntax. I'm confused on why the uint32_t is in parenthesis and how...
  3. Thread: Tic Tac Toe game

    by nafix
    Replies
    6
    Views
    5,222

    What would be a good technique to store and keep...

    What would be a good technique to store and keep information about all the cells? The plan is in the main function, I'm going to switch off between the player function and computer function. As it...
  4. Thread: Tic Tac Toe game

    by nafix
    Replies
    6
    Views
    5,222

    Tic Tac Toe game

    I need help in the player move function. How would I go about storing a 'x' or 'o' in an array and keep it there? As it is, I'm using the integer i as the user input and I don't know how I can take...
  5. Replies
    7
    Views
    1,593

    [QUOTE=foxman;684487] #include...

    [QUOTE=foxman;684487]
    #include<stdio.h>
    #include<string.h>
    int palin(char array[20])
    {
    char *n;
    n = array[0];
    /* I don't know what u mean with (char *) = (char). How exactly would i code...
  6. Replies
    7
    Views
    1,593

    Does anyone know why my pointer isn't working for...

    Does anyone know why my pointer isn't working for this program?
  7. Replies
    7
    Views
    1,593

    So here is my new code: #include...

    So here is my new code:



    #include<stdio.h>
    #include<string.h>
    int palin(char array[20])
    {
    char *n;
    n = array[0];
  8. Replies
    7
    Views
    1,593

    Help with recursion program

    The program is supposed to test whether or not a word is a palindrome through using recursion. I'm getting a lot of errors when i try and compile this program. Can anyone help me out with this? It...
  9. Replies
    3
    Views
    2,157

    Thanks for the response. I'm still a bit confused...

    Thanks for the response. I'm still a bit confused though. I can't have any print statements in my main function. Let's say I make another function that prints "Enter x: " and scans in x. How do I...
  10. Replies
    3
    Views
    2,157

    Help understanding functions

    I'm having a problem with a program I'm trying to code. The program needs to calculate the the value of e^x by using its formula which is e^x= summation x^n/ n!
    So I have all the code worked out:
    ...
  11. Replies
    1
    Views
    1,013

    Help with x^n loop

    How can I compute the value of x^n without using any library functions? Also can anyone tell me how to calculate factorials such as n!?

    This is what I came up with for x^n but it gives me tons of...
  12. Replies
    2
    Views
    1,072

    Help with newline problem

    Can someone please help me with this assignment:
    1. In cryptography, one of the simplest ciphers is known as a mono-alphabetic shift cipher. In this cipher, each time a letter appears in the...
  13. Replies
    4
    Views
    1,199

    I fixed those and now when I compile I get like...

    I fixed those and now when I compile I get like 20 errors. Am I defining things wrong?
  14. Replies
    4
    Views
    1,199

    help with program

    Can someone help me with what I'm doing wrong. I'm getting "parse error before else" on the 19, 25, and 31 line.
    Here is the assignment:Write a C program that takes as input three integers and then...
  15. Replies
    5
    Views
    1,627

    Oh, I had put in &a again for the second scanf...

    Oh, I had put in &a again for the second scanf instead of &b. Now it works. Thanks for the help guys.
  16. Replies
    5
    Views
    1,627

    i tried a= 2 and b= 3. i've tried multiple...

    i tried a= 2 and b= 3. i've tried multiple conditions where b is bigger or c is equal, but i always get "The Greater Number is 1"
  17. Replies
    5
    Views
    1,627

    Help with if statement

    This is an assignment i'm working on:
    Write a C program that indicates which of the two given numbers is greater. The program
    should receive two float numbers as input from the user. If the first...
  18. Replies
    22
    Views
    2,496

    [QUOTE=nafix;669560][QUOTE=nafix;669551]This is...

    [QUOTE=nafix;669560][QUOTE=nafix;669551]This is my program thus far:


    #include <stdio.h>
    int main(void)
    {int a, b, c, thousands, hundreds, tens, ones;
    b=1000;
    printf("Enter a number(integer):...
  19. Replies
    22
    Views
    2,496

    do i put that in a print function? how would i go...

    do i put that in a print function? how would i go about initializing modulo in code?
  20. Replies
    22
    Views
    2,496

    Is there a way to print out the remainder of...

    Is there a way to print out the remainder of integer/ 1000? So if i divide 12225 by 1000 to get 12.225, can I print out the 2 for hundreds, 2 for tens, and 5 for ones? Or can I print out the...
  21. Replies
    22
    Views
    2,496

    but the program has to work for integers over...

    but the program has to work for integers over 9,999. subtracting out 1000 wouldn't work for things over that number, right?
  22. Replies
    22
    Views
    2,496

    [QUOTE=nafix;669551]This is my program thus far:...

    [QUOTE=nafix;669551]This is my program thus far:


    #include <stdio.h>
    int main(void)
    {int a, b, thousands, hundreds, tens, ones;
    b=1000;
    printf("Enter a number(integer): ");
    scanf("%d", &a);...
  23. Replies
    22
    Views
    2,496

    This is my program thus far: {int a, b,...

    This is my program thus far:
    {int a, b, thousands, hundreds, tens, ones;
    b=1000;
    printf("Enter a number: ");
    scanf("%f", &a);
    thousands= a/b;
    printf("%d", thousands);
    So I want to divide the...
  24. Replies
    22
    Views
    2,496

    need help with c programming hmwk

    Can someone please help me with this assignment? I'm a programming noob and any help would be greatly appreciated. Write a program that receives an integer from user and prints out the number of...
Results 1 to 24 of 24