Recent content by heavyc

  1. H

    Selection Sort Program with Comparison and Swap Counter | Code Help

    Okay here's the deal I am writing a program so that i could put a counter into a selection sort and count the comparsions and the swaps but when i wrote thw code I get 4 error messages and I don't know why so here is the code if anyone can help it would be nice thank you #include <iostream.h>...
  2. H

    Incorporate another function into this problem C++

    i have this problem and i am having trouble how to incorporate another function into this problem here is the problem.. #include <iostream> using namespace std; struct node { int data; node *next; }; struct node *push_front ( node *list, int data ) { node *p = new node...
  3. H

    Help With Linked Lists - Struggling to Get Started

    some code i think #include <iostream> using namespace std; struct node { int data; node *next; }; struct node *push_front ( node *list, int data ) { node *p = new node; p->data = data; p->next = list; list = p; return list; } int main() { node *list =...
  4. H

    Help With Linked Lists - Struggling to Get Started

    I was wondering if anyone can help me with linked lists? I have to create a linked list with 10 random numbers rangeing from 1-5 and insert them into a node in the appriote postion of a linearly linked list and display the number of times each number of occurences of each item. and i have to...
  5. H

    Linked List Creation and Manipulation in C++: A Comprehensive Guide

    i was wondering if anyone can help me with linked lists? I have to create a linked list with 10 random numbers rangeing from 1-5 and insert them into a node in the appriote postion of a linearly linked list and display the number of times each number of occurences of each item. and i have to...
  6. H

    How Do You Implement a Recursive Function to Calculate Powers in C++?

    so would i do this ?? else return n * compute_exponent(n - 1); // which would return and use the function again?.
  7. H

    How Do You Implement a Recursive Function to Calculate Powers in C++?

    could i use the factorial method to do this one and is it a easier way to go??like i said I am really new to this and yes i do know how to program in C++.
  8. H

    How Do You Implement a Recursive Function to Calculate Powers in C++?

    comp science homework help! I have this problem in Data Abstraction and problem solving with C++. Here is the problem. Implement a C++ program that calls a recursive function "compute_exponent". compute_exponent function computes a to the power n, where a is a real number and n is a...
  9. H

    Are there any composite numbers in this equation?

    O ok i think I get it now so ur saying that if I take the number and try and multiply it by any numbers that I can and try to get that number? Thank You for the help I really appreciate it. You were very helpful
  10. H

    Are there any composite numbers in this equation?

    I still don't understand by what you mean can you give me an example why 3233 is composite?
  11. H

    Are there any composite numbers in this equation?

    Well what's I mean how do you know that it is composite what steps do you do to prove that it is composite?
  12. H

    Are there any composite numbers in this equation?

    how would you calculate them to be composite because I have a hard time figuring this out because I think that a prime number can only be divisible by 1 and composite can be divisible by more than 2 factors. Would you be able to clarify this for me?
  13. H

    Are there any composite numbers in this equation?

    here are all the numbers in the sequence! These are all the numbers in the sequence if someone could take a look at them and check me because i think that all the numbers are prime. [k] [number after equation] 1 1523 2 1447 3 1373 4 1301 5...
  14. H

    Are there any composite numbers in this equation?

    I was just wondering if there are any composite numbers in this equation for every number from k = 1 - 100 k * k - 79 * k + 1601 all the numbers that I have come across seem to be prime but I could be wrong so if some one could check my work Please it would be helpful
  15. H

    Need Help proving these equations

    thank you very much i was wondering if u knew anything about discrete math because for that second problem what numbers would you start with because i don't know if i should let u = 1 v = 2 x = 3 y = 4 and z = 5 and then start the loop with those numbers and then try it that way??
Back
Top