Search:

Type: Posts; User: Kristyy_mariee

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    16,973

    and also where the return statements would be , i...

    and also where the return statements would be , i was wondering if a return statement should be in the if where isswapped==false... but im not sure.
  2. Replies
    20
    Views
    16,973

    Something is seriously wrong with the loops. And...

    Something is seriously wrong with the loops. And its confusing me.. plus I need to know how to print the array once its sorted. right now im getting the unsorted numbers from the file and just bogus...
  3. Replies
    20
    Views
    16,973

    No, it does not.

    No, it does not.
  4. Replies
    20
    Views
    16,973

    Updated: #include #include...

    Updated:


    #include <iostream>
    #include <fstream>
    using namespace::std;


    int bubblesort( int arrayf[], int size);
  5. Replies
    20
    Views
    16,973

    Ok this is what ive done so far.. #include...

    Ok this is what ive done so far..


    #include <iostream>
    using namespace::std;


    int bubblesort( int arrayf[], int size);

    int bubblesort( int arrayf[], int size)
  6. Replies
    20
    Views
    16,973

    thanks so much for this... So im trying to apply...

    thanks so much for this... So im trying to apply this code to bubble sort and i kno that bubble sort needs to compare values[i] and values[i-1] im not sure where to place this condition and what to...
  7. Thanks. I understand what youre saying... i just...

    Thanks. I understand what youre saying... i just honestly do not know how to make recursion work for this. i have some code which prints 1-10 without a loop but for something as complex as a bubble...
  8. I didnt kno my question asked for somebody to...

    I didnt kno my question asked for somebody to take time out to bull........ on here. but thanks.
  9. writing a program that is not allowed to have loops.

    Integers will be read from the file and should be bubble sorted.. its a lot of if statements to avoid the for loop and its still not sorting correctly..Is there any way i can shorten this code and...
  10. Replies
    20
    Views
    16,973

    So for eg, an array of 10 ints wouldn't there be...

    So for eg, an array of 10 ints wouldn't there be numerous if statements?
  11. Replies
    20
    Views
    16,973

    Im completly clueless when it comes to recursion...

    Im completly clueless when it comes to recursion it seems so confusing, an example of a recursive function would be great
  12. Replies
    20
    Views
    16,973

    Yeh its 10 integers, ive been asked to do it so i...

    Yeh its 10 integers, ive been asked to do it so i need to kno if its possible..
  13. Replies
    20
    Views
    16,973

    Bubble sorting an array using NO loops.

    Is it possible to bubble sort using no loops? or perhaps a recursive technique?
  14. Thread: Bitset

    by Kristyy_mariee
    Replies
    2
    Views
    3,107

    Bitset

    Id like to determine the output of this code. I've never used bitset before.



    #include <iostream>
    #include <bitset>
    using namespace std;

    int main() {
  15. Replies
    2
    Views
    3,493

    Function to check for palindrome

    bool isPalindrome(bitset<8> bits);
    {
    bool palindrome = true;
    bitset<Max> b = bits;
    for(int i = 0; i < Max/2 - 1; i++) {
    if(b[i] ^ b[Max-1-i]) {
    palindrome =...
  16. Replies
    1
    Views
    2,009

    Bitset help

    #include <iostream> #include <bitset> using namespace std; int main() { bitset<8> bits = 83; cout << bits << " "; cout << bits.to_ulong() << endl << endl; bits[0] = 0; cout << bits <<...
  17. when i put eihter or "" it send the error up...

    when i put eihter <> or "" it send the error up to that line saying no such file or directory
  18. hmm i did that already to see if it wouldchange...

    hmm i did that already to see if it wouldchange anything. still saying that the class phones is undeclared..
  19. Declaring an object of class type. Giving errors, need help!

    I'm new to writing classes.
    This is the class file.


    #include <iostream>
    #include <string>

    using namespace std;
    class phones
  20. Replies
    12
    Views
    1,108

    The entire solution for this problem would be...

    The entire solution for this problem would be great, im trying to do the same thing with my code..
  21. I agree because this the first course for...

    I agree because this the first course for programming at the university, but its due Thursday and me and the people in my class havent even started on the calculations for this thing
  22. Oh lol, yehh i took it out, didnt change anything...

    Oh lol, yehh i took it out, didnt change anything though
  23. this is my code now #include ...

    this is my code now

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


    char name[20];
    int patients=1;
  24. Thanks so much, just addin on .txt when i entered...

    Thanks so much, just addin on .txt when i entered the file name works :)
  25. from what I think youre trying to say...I dont...

    from what I think youre trying to say...I dont think their hard coded if yu mean what i think you mean (fairly new to programming) i basically just have them listed in the file and then their just...
Results 1 to 25 of 35
Page 1 of 2 1 2