Search:

Type: Posts; User: brillpsycho

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    747

    very simple preprocessor

    Can anyone tell me why i cant print out the max number? What am i missing? And yes, it has to be defined outside of main. thanks.



    #include <stdio.h>


    #define MAX(x,y) ((x)>(y)?(x):(y))
    ...
  2. Thread: pointers

    by brillpsycho
    Replies
    3
    Views
    1,312

    pointers

    I moved the external variables into main, but am stuck now on how to get my analyze_hand function to call correctly. Any input is appreciated.

    nevermind. thank you
  3. Replies
    11
    Views
    1,818

    Thanks for the encouragement! lol I know why its...

    Thanks for the encouragement! lol I know why its going to always be true- its because the lst is always going to be a right brace and fst will always be a left brace. Still messing with the push...
  4. Replies
    11
    Views
    1,818

    heres other changes that i made, but still not...

    heres other changes that i made, but still not working:



    #include<stdbool.h>
    #include<stdio.h>


    #define STACK_SIZE 100
  5. Replies
    11
    Views
    1,818

    Yes to the external variables. Unfortunately. I...

    Yes to the external variables. Unfortunately.
    I changed to final statement to


    if ( fst == '(' && lst == ')' || fst == '{' && lst == '}')
    printf("\nParenthesis/brackets nested...
  6. Replies
    11
    Views
    1,818

    sample: {(())} - should be nested properly...

    sample:


    {(())}
    - should be nested properly


    {{})
    - not nested properly
  7. Replies
    11
    Views
    1,818

    properly nested

    Hey all, Ive been working on this program for a while and keep changing it around. Im trying to have it verify that the user inputted braces are properly nested. I keep coming up with the outcome...
  8. Replies
    2
    Views
    1,180

    string stops at first letter

    Hey, can anyone help me figure out why the program keeps stopping with the first letter instead of following through the string??


    #include <iostream>
    #include <string>


    using namespace std;
  9. Thread: looping

    by brillpsycho
    Replies
    9
    Views
    1,333

    But maybe I do have no business programming. I've...

    But maybe I do have no business programming. I've only been doing it for 5 weeks. I've read and re-read the book I have also. And been putting in hours upon hours trying to learn. Thanks again.
  10. Thread: looping

    by brillpsycho
    Replies
    9
    Views
    1,333

    OMG Thank you! Im not asking for anyone to do my...

    OMG Thank you! Im not asking for anyone to do my work for me, i just didn't even think about closing and reopening.
  11. Thread: looping

    by brillpsycho
    Replies
    9
    Views
    1,333

    currently what i have is: input file: this is...

    currently what i have is:
    input file:
    this is
    my file

    output file:
    this is
    THIS IS
    my file
    MY FILE
  12. Thread: looping

    by brillpsycho
    Replies
    9
    Views
    1,333

    i want it to output the line as read. I want it...

    i want it to output the line as read. I want it to output the entire file as read...and then the entire file as capitals.
  13. Thread: looping

    by brillpsycho
    Replies
    9
    Views
    1,333

    yes!! exactly

    yes!! exactly
  14. Thread: looping

    by brillpsycho
    Replies
    9
    Views
    1,333

    looping

    Hit a bump again. Heres the part of my program thats not going according to plan. with my inputted file i want it to output it exactly the same, then output another copy but in all caps. As of now,...
  15. Replies
    3
    Views
    1,189

    HAHAHA just kidding. I got it.

    HAHAHA just kidding. I got it.
  16. Replies
    3
    Views
    1,189

    Which compiler do you use? When i make those...

    Which compiler do you use? When i make those changes ^ it doesnt allow me to input anything.
  17. Replies
    3
    Views
    1,189

    out putting upper case letters

    Can anyone help me figure out what im doing wrong? I want to input a string of characters, or better yet, multiple lines of strings, and out put them as capital letters. What i have so far will allow...
  18. Replies
    11
    Views
    1,764

    heres new code: #include ...

    heres new code:



    #include <stdio.h>


    int main(void)
    {
    int num1; //1st number
  19. Replies
    11
    Views
    1,764

    I added braces, and just for now im assuming the...

    I added braces, and just for now im assuming the 1st number if the higher of the 2 numbers. With braces it changes it but im still getting an out come of my calculations only being for the 1st number...
  20. Replies
    11
    Views
    1,764

    heres what I have so far. one loop is starting at...

    heres what I have so far. one loop is starting at the end of the 1st instead of into it. ???


    #include <stdio.h>


    int main(void)
    {
    int n1; //number1
    int n2; //number2
  21. Replies
    11
    Views
    1,764

    nested loops

    Hello, I am having problems doing calculations in a loop.
    What Im trying to do is- count from number1 to number2- which i did using a FOR loop. So, say the numbers are 3 4 5 6 7, I need to take...
  22. Replies
    1
    Views
    728

    separating numbers

    Im working on a program that will take a routing number from a check (8digits)and determine the checks number (9th digit). I got that far and was able to separate the digits
    doing this:...
Results 1 to 22 of 22