Search:

Type: Posts; User: return0

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: recursion

    by return0
    Replies
    5
    Views
    2,326

    ** filename: liar.c */ #include ...

    ** filename: liar.c
    */
    #include <stdio.h>
    #include <stdlib.h>

    int liar_liar(int);

    int main(void) {
    int n = 1;
    int func = 0;
  2. Thread: recursion

    by return0
    Replies
    5
    Views
    2,326

    recursion

    I need to see a recursive program in C that determines a sequence of numbers called the Liar Liar numbers.

    Liar Liar numbers are a sequence of negative numbers in which each number is two times...
  3. Replies
    4
    Views
    1,568

    C transaction program

    Hi all, I am running a little business on the side and was wondering of anyone knew of a program I could use that will show me the balances of clients after withdrawals, deposits. For example, if i...
  4. Thread: array help

    by return0
    Replies
    3
    Views
    616

    so would i need to add a strcmp function after...

    so would i need to add a strcmp function after asking the user to enter the metal type, then compare their input to each of the metal types using an if else statement until it is compared to the...
  5. Thread: array help

    by return0
    Replies
    3
    Views
    616

    array help

    int Q[7];

    int P[7];

    char* T[20];

    int q1=0;

    int p1=0;
  6. Replies
    4
    Views
    2,801

    can those be used with C as well?

    can those be used with C as well?
  7. Replies
    4
    Views
    2,801

    case sensitive and spacing

    #include <stdio.h>
    #include <string.h>
    int main(){
    char string1[20];
    int i, length;
    int flag = 0;
    printf("Enter a string: ");
    scanf("%s", string1);
    length = strlen(string1);
  8. Thread: infinite loop

    by return0
    Replies
    9
    Views
    1,002

    i had this part working earlier but i changed...

    i had this part working earlier but i changed some stuff and now i cant figure out how to get this part to work correctly again. i know its a simple problem but i guess im just burnt out because i...
  9. Thread: infinite loop

    by return0
    Replies
    9
    Views
    1,002

    got everything working now ignore the post below...

    got everything working now ignore the post below too
  10. Thread: infinite loop

    by return0
    Replies
    9
    Views
    1,002

    not really complaining, i came here with a...

    not really complaining, i came here with a problem seeking help to fix it, after all isnt this what this website is for? as for the fgets and sscanf, we havent learned those yet so i cant use those...
  11. Thread: infinite loop

    by return0
    Replies
    9
    Views
    1,002

    Yeah when i run it and enter a wrong number it...

    Yeah when i run it and enter a wrong number it will keep saying Wrong number. Please try again! I need it to say that and then prompt the user to type the number in again until they type one that...
  12. Thread: infinite loop

    by return0
    Replies
    9
    Views
    1,002

    infinite loop

    anybody know what i need to do to get rid of the infinite loop?



    do
    {
    printf("Enter the number of tests:");
    scanf("%d", &test);
    if (test< 0 || test> 4)
    printf("Wrong number....
  13. Replies
    6
    Views
    924

    #include #include int...

    #include<stdio.h>
    #include<string.h>
    int main(){
    char str[50];
    char *rev;
    printf("Enter any string : ");
    scanf("%s",str);
    rev = strrev(str);

    printf("Reverse string is : %s",rev);
  14. Replies
    6
    Views
    924

    Reverse strings

    Does anyone know how to make it so an output for a program would print out the string in reverse/backwards? I was just curious on how to do this. Thanks!
  15. Thread: C Program

    by return0
    Replies
    14
    Views
    1,890

    Hey guys here is what I got for my program : ...

    Hey guys here is what I got for my program :






    #include"stdio.h"

    int x[15],used[15]; int adj[15][15]={0}; int path[15][15],wght[15];
  16. Replies
    4
    Views
    1,086

    Oh I did not know wiki had a page for it. Would...

    Oh I did not know wiki had a page for it. Would you mind linking it to me? I'd like to read up on it. I probably should have posted this on my former post sorry forgot about that one.
  17. Replies
    4
    Views
    1,086

    Output confusion

    Hey guys I was a little confused on what the output is supposed to be on this program I didn't really understand it in the directions. Can anyone please explain it to me better if you understand it?...
  18. Thread: C Program

    by return0
    Replies
    14
    Views
    1,890

    C Program

    Hey guys, I was wondering how difficult of a Program this is and around how much time it would be expected to complete it.




    Traveling Salesperson Problem



    We have talked about...
  19. Thread: loop question

    by return0
    Replies
    1
    Views
    617

    nvm i figured it out by using a do while loop.

    nvm i figured it out by using a do while loop.
  20. Thread: loop question

    by return0
    Replies
    1
    Views
    617

    loop question

    int calc1;


    printf("How many times to perform the calculation (2-5): ");
    scanf("%d", &calc1);
    if (calc1<2 || calc1>5)
    printf(The value is out of range. Please try again.)


    If the user...
  21. Replies
    10
    Views
    1,160

    actually when i enter a weekday it says invalid...

    actually when i enter a weekday it says invalid day entered too for some reason i cant figure out how to fix it.

    it seems its not registering the else if statements after



    if (day == 'S'...
  22. Replies
    10
    Views
    1,160

    yeah heres what i have with the correction and...

    yeah heres what i have with the correction and the added curly bracers.


    #include <stdio.h>
    int main () {

    char S, M, T, W, R, F, A, day;
    int hour;
  23. Replies
    10
    Views
    1,160

    yeah heres what i have with the correction and...

    yeah heres what i have with the correction and the added curly bracers.


    #include <stdio.h>
    int main () {

    char S, M, T, W, R, F, A, day;
    int hour;
  24. Replies
    10
    Views
    1,160

    oh yeah i forgot about that thanks. i fixed that...

    oh yeah i forgot about that thanks. i fixed that but i cant figure out the error in line its all the same error it says
  25. Replies
    10
    Views
    1,160

    Help fixing code

    Can anyone tell me whats wrong with my code? It has some syntax error in line 22,24 and 26 and when theres no syntax error it says its the weekend no matter what i type.



    #include <stdio.h>...
Results 1 to 25 of 28
Page 1 of 2 1 2