User Profile

Collapse

Profile Sidebar

Collapse
MariyaGel
MariyaGel
Last Activity: Apr 10 '07, 01:32 AM
Joined: Nov 29 '06
Location: New York City
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • MariyaGel
    replied to function......
    in C
    Well if you wanted to use a for loop instead on a while loop than I think you would have to do it like this:
    for (int num=0; num<=36; num+=4) // since I believe you have to go by four.
    {
    if (strange(num))
    cout<<"True"<<e ndl;
    else
    cout<<"False"<< endl;
    }...
    See more | Go to post

    Leave a comment:


  • MariyaGel
    replied to function......
    in C
    Your absolutely correct every time it goes through the loop 4 is added to the number and it turns out just as you have said it.
    Then the function decideds whether the remainder of that number divided by 2 is 0 as well as the remainder of that number divided by 3 is 0 and if both of these remainders are 0 then and only then will the function return true, otherwise it returns false.
    So it will only return true for the numbers that...
    See more | Go to post

    Leave a comment:


  • MariyaGel
    replied to Problem with reading in a word
    in C
    That was absolutely correct I can't believe I missed that. It worked out perfectly , Im using Dev-C++ and double mass[n] workes with no problem. I just got confused how i was suppose to declare an array of words, I wasnt sure you can have an array or words and not just characters.
    Thank you very much
    See more | Go to post

    Leave a comment:


  • MariyaGel
    replied to if-else statement
    in C
    From what I know its the mod operator and so far I only know that you can use it for finding the reminder. Im not sure if it has any other uses. Maybe someone more knowledgeable can answer that question better.
    = )...
    See more | Go to post

    Leave a comment:


  • MariyaGel
    replied to if-else statement
    in C
    The purpose of placing the % is that ur asking for the remainder after the number is divided by 2. If the remainder is 0 then the number is even. e.g if you do 10 % 6 than that would give you 4.
    Hope it helped...
    See more | Go to post

    Leave a comment:


  • Im not exactly sure if this is what you wanted since im new at this but i got the program to stop being in an endless loop and you can fix up the rest from here.

    Here it is:

    #include<iostre am>
    #include<fstrea m>
    using namespace std;
    void menu();
    int read_accts(int [], double [], int);
    void withdrawal(int [], double [], int);
    void deposit(int [], double [], int);...
    See more | Go to post

    Leave a comment:


  • MariyaGel
    started a topic Problem with reading in a word
    in C

    Problem with reading in a word

    I have wrote the program and it worked fine until I had to include one more array into it. As you can see below the two arrays of volume and mass are working properly now I need to include a third array which reads in the sample name that coincides with the mass and the volume. I have tried the getline function and that didnt work. This is my first class in computer programming and im very new to it so if i have made obviouse mistakes i apologize....
    See more | Go to post
    Last edited by Banfa; Nov 30 '06, 03:21 AM. Reason: Changed B tags to code tags
No activity results to display
Show More
Working...