Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
27% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
3 Commented Posts
0 Endorsements
Ranked #4K
~4K People Reached
Favorite Forums
Favorite Tags
c++ x 124
Member Avatar for Jboy05

How do I reverse the numbers in my program to produce the orginal numbers and the numbers in reverse? int magic_box (int N) { int digit1, digit2, digit3; digit1 = N / 100; digit2 = N % 100 /10; digit3 = N % 10; return digit1 + digit2 * 10 …

Member Avatar for tesuji
0
266
Member Avatar for Jboy05

How do I write a C++ function void ShiftRight (int A[], int m, int n) to shift all elements in the array A to the right m places. Array A has n elements. For instance, if ARY array has {1,2,3,4,5}, calling ShiftRight(ARY, 2, 5) will change the contents of ARY …

Member Avatar for Nick Evan
0
216
Member Avatar for Jboy05

How do I write a C++ for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 ..... 1000 I don't know anything about loops, so any help will be much appreciated Thank you much. :)

Member Avatar for Jboy05
0
95
Member Avatar for Jboy05

I need help Fixing this I traced through the code, and it compiles not error but when I run the program its just goes crazy I need help finding a the soultion to this problem please Thank you very much [CODE]#include <iostream> #include <fstream> #include <cstdlib> using namespace std; int …

Member Avatar for VernonDozier
0
161
Member Avatar for Jboy05

After I Prompt the user to get an integer from the keyboard, display the number on screen if it is an even number how do I write the number into a file in A:\ drive under the name OddFile.txt. if its odd. [CODE=cplusplus] #include <iostream> #include <fstream> #include <cstdlib> using …

Member Avatar for Ancient Dragon
0
96
Member Avatar for Jboy05

Do you see anything wrong with this if so let me know [code=cplusplus] #include <iostream> #include <fstream> #include <cstdlib> using namespace std; int main () { int num; ifstream AFile; AFile.open('a:\\OddFile.txt'); AFile << "Enter an integer number please: "; cin >> num; If (num % 2 = 0) AFile << …

Member Avatar for Jboy05
0
141
Member Avatar for Jboy05

how do i write a C++ function called RepeatingWords that displays a word (passed in through a string type parameter) N (also passed through a parameter) times. Then, write a calling statement for the function

Member Avatar for Narue
0
82
Member Avatar for Jboy05

I need help with a conversion this to a switch statement, I haven't done one before that is why im asking [code]Convert the following C++ if statement to equavalent switch statement: if (SalesType >= 4 && SalesType <= 5) { TypeName = "Weekly Special"; DiscountRate = 0.45; } else if …

Member Avatar for Narue
0
109
Member Avatar for Jboy05

how do I Write a function call WelcomeMsg which displays the message "Welcome back! I wish you have a great Spring Break". Then write a calling statement for it?

Member Avatar for Narue
0
81
Member Avatar for Jboy05

Consider the following two function prototypes: void Func1(int&, int&); int Func2(double, double); -I need help completing the following C++ user-defined function Func3 -which prompts and gets an integer for the variable Option from user. -Func1 should be called when the value of Option is 1, - Func2 should be called …

Member Avatar for mitrmkar
0
123
Member Avatar for Jboy05

I have to write a C++ function named MPG which returns the number of miles a car can travel with one gallon of gasoline. The function should have three parameters: the size of gas tank in gallons, number of miles traveled, and gasoline left in tank in gallons. this is …

Member Avatar for superjacent
0
176
Member Avatar for Jboy05

I have to wrtie a valid C++ condition (Boolean expression) for each of the following checks: (naming my own variable when needed) [code] if the value of the variable GPA is between 3.0 and 3.6 excluding 3.0 and 3.6. if a voter is at least 18 years old and had …

Member Avatar for Ancient Dragon
0
110
Member Avatar for Jboy05

Given the following variable declarations and function prototype. How do I write three different calling statement to the MyFunction function without declaring additional variable. int I; bool B; double D; double MyFunction (bool, int&);

Member Avatar for Jboy05
0
96
Member Avatar for Jboy05

Consider the following function prototypes and variable declarations: void Func1 (double, char &); bool Func2 (double, double); double Func3 (bool); double d1, d2; char c; Without additional function or variable, how do I write ONE C++ statement to call ALL THREE functions: Func1, Func2, and Func3?

Member Avatar for vijayan121
0
114
Member Avatar for Jboy05

How do I go about writing a user-defined function named Get_Inputs that when called, the function will prompt for three integers and send these numbers to its calling environment.

Member Avatar for Jboy05
0
99
Member Avatar for Jboy05

I need help fixing this I help getting errors #include <cstdlib> using namespace std; void show_word (string); int main () { show_word ("hello"); system ("PAUSE"); return 0; } void show_word (char); { char InName; cout << "Enter your name " << endl; cin >> InName >> endl; show_word ("hello"); show_word …

Member Avatar for Jboy05
0
108
Member Avatar for Jboy05

Consider the following user-defined function: [code]void Quick_Change (int x, int & y) { if (x == 0) y = 10; else if (y == 0) x = 10; } [/code] Assume the values in variable A and B are both of int type. How do I find what the values …

Member Avatar for Jboy05
0
93
Member Avatar for Jboy05

how do I wrtie a function that takes one argument of type double. The function returns the character value ‘P’ if its argument is positive and return ‘N’ if its argument is zero or negative. [code=c++] double Letter ( double P, double N) if (P = +); return P; else …

Member Avatar for kjc367
0
109
Member Avatar for Jboy05

Write a function that takes one argument of type double and that function returns the character value ‘P’ if its argument is positive and return ‘N’ if its argument is zero or negative? Help please Thank you Much :)

Member Avatar for kemkizal
0
84
Member Avatar for Jboy05

What kind of function do I need to used to change an employee's salary when given the old salary of the employee and the amount of increase for that employee (parameters). (i.e. function with no return value and no parameter, function with no return value and call-by-value parameters, function with …

Member Avatar for VernonDozier
0
77
Member Avatar for Jboy05

a = 2; b = 3; a = (a + b) % 2; b = b – a; a = a * b; cout << a << "\n" << b ; What is the output for a and b? ------------------------------------------------------------ Why is a [B]3[/B] and b[B] 2[/B] is this one …

Member Avatar for VernonDozier
0
77
Member Avatar for superjacent

I'm learning C++ from C++ Primer Plus, 5th Edition, and have come across the following problem. The following class declaration is given as part of the question: [code="cpp"] /* Name: move.h Copyright: Author: Steven Taylor Date: 31/01/08 15:05 Description: Class 'Move' header file. C++ Primer Plus, Ch.10,Prog. Ex 6. */ …

Member Avatar for superjacent
0
203
Member Avatar for Jboy05

Input = Fourdigitnum Output = digit1, digit2, digit3, digit4 Major Task (Module/Subproblems) 1. Receive Fourdigitnum 2. Extract the Fourdigitnum received 3. Remove the digit from the original number 4. Display digit 5. Repeat Step 2 1. Fourdigitnum ("Enter a four-digit positive integer: ") Receive Fourdigitnum 2. digit1= (Fourdigitnum)/1000 3. (Fourdigitnum)%1000 …

Member Avatar for Jboy05
0
97
Member Avatar for Jboy05

Hey, I need assistance in creating a IPO Chart for a homework assigment. [B]Problem[/B] Write a program that prompts the user to input a four-digit number positve integer. The program then outputs the digits of the number, one digit per line. For example, if the input is 3245. 3 2 …

Member Avatar for JRM
0
1K