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>...
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...
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...
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...
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++.
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...
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
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?
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...
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
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??