Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~3K People Reached
Favorite Tags
c++ x 15

7 Posted Topics

Member Avatar for buddy1

I'm having some trouble translating the following C++ program to Pep/8 assembly language. Can anyone help me solve this. This is what I have come up with. [code=cplusplus] #include <iostream> using namespace std; int list[16]; int i, numItems; int temp; int main() { cin >> numItems; for (i = 0; …

Member Avatar for mjmakl
0
2K
Member Avatar for buddy1

Can anyone tell me if I'm dong this correctly. S(10) = 1; S(n) = n + S(n + 1) for 0 < n < 10 I'm looking for the value of S(7) S(10) = 1 S(9) = 9 + S(9 + 1) = 10 S(8) = 8 + S(8 + …

Member Avatar for buddy1
0
72
Member Avatar for buddy1

I have a recursive function squares that receives a positive integer n and prints out the first n perfect squares in descending order. Can anyone tell me if this is correct and if not please help. [ICODE]squares(int n) { if( n== 1 ) return 1; else return squares ) n …

Member Avatar for buddy1
0
99
Member Avatar for buddy1

BinarySearch is called on the array below, searching for Value 20. Is the final value of Index 20 in [6]. I think this is right. 2 5 10 15 20 20 20 20 [1] [2] [3] [4] [5] [6] [7] [8]

Member Avatar for buddy1
0
78
Member Avatar for buddy1

I have to find the largest item in an arry as a recursive function. Can't seem to get it right. Any ideas. [CODE]#include <iostream> using namespace std; int maxArray( int anArray[], int n ); int main() { int anArray[4] = { 1, 6, 8, 3 }; cout << "the largest …

Member Avatar for Duoas
0
109
Member Avatar for buddy1

I have this program I have to write about adding binary numbers. Here is the write up: "Defining a binary number as int binNum[8]; write a C++ function void binaryAdd(int* sum, int& cBit, const int* bin1, const int* bin2) to compute sum as the sum of the two binary numbers, …

Member Avatar for buddy1
0
264
Member Avatar for big24fan

Try storing the name like this: [code=cpp]#include <string> string str, name; // Get string from user. cout << "Enter your full name and press ENTER: "; getline(cin, name); //Build the output string, and print it. str = "\nMy name is " + name + ".\n; cout << str;[/code]

Member Avatar for buddy1
0
163

The End.