User Profile

Collapse

Profile Sidebar

Collapse
gwenky
gwenky
Last Activity: Mar 19 '08, 05:05 AM
Joined: Feb 14 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gwenky
    replied to Arrays
    in C
    Thanks! That is a great idea!

    Julie
    See more | Go to post

    Leave a comment:


  • gwenky
    started a topic Arrays
    in C

    Arrays

    Hello,

    I am working on the last peice of my final for my C++ class. I understand the rules about helping with homework, so this is really just a question. If I wanted to find out if my char array[] had all the same character's in the array, what would be the best method for attempting this type of thing.

    So, example:

    char array [];

    user enters: aaaa

    how then, should I proceed...
    See more | Go to post

  • gwenky
    replied to Question regarding an assignment...
    in C
    thanks so much!! it was the x/10 component that I was missing...now it all makes sense!
    See more | Go to post

    Leave a comment:


  • gwenky
    replied to Switch statement
    in C
    Thanks, that was what I was wondering. Sorry I did not enter my question very clearly.
    See more | Go to post

    Leave a comment:


  • gwenky
    started a topic Switch statement
    in C

    Switch statement

    Can a switch statement be static_cast'ed to become an int from a double?

    Thanks....
    See more | Go to post

  • gwenky
    started a topic Looping issues...
    in C

    Looping issues...

    Hello, so I was working this out yesterday and I am working on a function (w/o using arrays) that moves through the digits of a user inputted number and finds max/min ...this is the max option and it works ( up to < 10000), but I was wondering if there is a better format for looping this ...and if so where should I begin to look?
    [code=cpp]
    int FindDigitAtPosi tion ( int x, double counter )
    {
    for ( i = 1; i <= counter;...
    See more | Go to post
    Last edited by sicarie; Feb 29 '08, 08:33 PM. Reason: Code tags are also greatly appreciated....

  • gwenky
    replied to Question regarding an assignment...
    in C
    I agree that my x is just resetting each loop through...so I put in "13" the output would be :

    3
    3
    3

    ...this is where I'm not sure how to create a variable to capture that digit and continue on...

    int FindDigitAtPosi tion ( int x, double counter )
    {
    for ( i = 1; i <= counter; ++i )
    {
    x = x % 10;

    if ( max <= x )
    {
    max...
    See more | Go to post

    Leave a comment:


  • gwenky
    started a topic Question regarding an assignment...
    in C

    Question regarding an assignment...

    Hello, I'm really new to C++ and this forum, but I have read the "rules" regarding homework and I'm just looking for some guidance. I need to create a function that asks for the user to input an integer, finds the number of digits and digits at position, sum digits, average digits and find max and min from the number. What I am really trying to create is the finddigitsatpos iton function. The rest I have either done or understand....
    See more | Go to post
    Last edited by Ganon11; Feb 29 '08, 02:57 PM. Reason: Please use the [CODE] tags provided.

  • gwenky
    replied to C++ help!!
    in C
    Thanks, I did notice that ...I am not looking for the "answer" but rather why my logic is off? I closed the bracket and added the ; but the issue remains that I know I'm not accounting for the days correctly. Any suggestions on articles to read? Or....??...
    See more | Go to post

    Leave a comment:


  • gwenky
    started a topic C++ help!!
    in C

    C++ help!!

    Hello, I'm new to C++. A few years ago I took a C programming course, so I feel shaky with both. Today my question is related to an age in days and age in months program I'm writing. I can get the total year and months, but I'm having a hard time figuring out how to find the days. In this particular case I do not have to worry about leap year. And, Feb always =28.

    This is the bit I have for months that works:

    ...
    See more | Go to post
No activity results to display
Show More
Working...