C++ Programming Solutions

Programming solution to problems C++

Checking Two Array Members Are Equal Or Not | C++

Source Code #include<iostream> using namespace std; int main() {       int array1[5], array2[5];             int members1, members2;        cout << “Enter numbers in first Array” << endl;        for(members1 = 0; members1 < 5; members1 ++)        {               cin >> array1[members1];        }        cout << “Enter numbers in second Array” << endl;        for(int …

Checking Two Array Members Are Equal Or Not | C++ Read More »

Programming solution to problems C++

Using Array Finding Element in Index of Array | [*Solved*] | C++

Source code #include<iostream> using namespace std; int main() {        int enter;        int find[6];        cout << “Enter Numbers to save in array” << endl;        for(int i = 0; i < 6; i ++)        {               cin >> find[i];        }        cout <<“Enter a Number you want to see the address …

Using Array Finding Element in Index of Array | [*Solved*] | C++ Read More »

Programming solution to problems C++

Input Numbers Until -ive # Entered & Count| if Condition | C++

Write a program that inputs numbers from the user till the user inputs a negative number. The program should then print the total number of times the number 1 was Coding #include<iostream> using namespace std; int main() {       int i = 1;       int j=0;      cout<<“Please enter a number, and When finished, …

Input Numbers Until -ive # Entered & Count| if Condition | C++ Read More »

Programming solution to problems C++

Program For Ship Direction Using Class [Solved] | OOP | C++

Create a class called ship that incorporates a ship’s number and location. Use the approach of Exercise 8 to number each ship object as it is created. Use two variables of the angle class from Exercise 7 to represent the ship’s latitude and longitude. A member function of the ship class should get a position …

Program For Ship Direction Using Class [Solved] | OOP | C++ Read More »

Programming solution to problems C++

Print “I am object number –” | [Solved] | Classes | OOP | C++

Create a class that includes a data member that holds a “serial number” for each object created from the class. That is, the first object created will be numbered 1, the second 2, and so on. To do this, you’ll need another data member that records a count of how many objects have been created …

Print “I am object number –” | [Solved] | Classes | OOP | C++ Read More »

Programming solution to problems C++

Imagine a tollbooth at a bridge | [Solved] | Classes | OOP | C++

Imagine a tollbooth at a bridge. Cars passing by the booth are expected to pay a 50 cent toll. Mostly they do, but sometimes a car goes by without paying. The tollbooth keeps track of the number of cars that have gone by, and of the total amount of money collected. Model this tollbooth with …

Imagine a tollbooth at a bridge | [Solved] | Classes | OOP | C++ Read More »

Scroll to Top