Thanks! That is a great idea!
Julie
User Profile
Collapse
-
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... -
thanks so much!! it was the x/10 component that I was missing...now it all makes sense!Leave a comment:
-
Thanks, that was what I was wondering. Sorry I did not enter my question very clearly.Leave a comment:
-
Switch statement
Can a switch statement be static_cast'ed to become an int from a double?
Thanks.... -
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;... -
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...Leave a comment:
-
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.... -
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....??...Leave a comment:
-
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:
...
No activity results to display
Show More
Leave a comment: