C++ Answers

Questions answered by Experts: 9 913

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search


2.Give a brief Account on the technology used in flash memory implementation. [25 marks]


3.Explain the start-up process clearly indicating the purpose of the POST,BiOS and CMOS.[25 marks]


4.With the aid of the diagram,give a brief explanation on the type of busses available on modern computer systems and tge purpose of the North bridge and south Bridge.

Your diagram should clearly show where the bridges are and what conects them. [25 marks]


C++: By using a for loop, write a program that prints the numbers 45 to –45, in decrements of 5:
A cashier distributes change using the maximum number of five dollar bills, followed by one dollar bills. For example, 19 yields 3 fives and 4 ones. Write a single statement that assigns the number of 1 dollar bills to variable numOnes, given amountToChange. Hint: Use the % operator.

#include <iostream>
using namespace std;
int main() {
int amountToChange;
int numFives;
int numOnes;

cin >> amountToChange;
numFives = amountToChange / 5;

/* Your solution goes here */

cout << "numFives: " << numFives << endl;
cout << "numOnes: " << numOnes << endl;
return 0;
}

Write a c++ program to implement the following . Assuming that a text file named first.txt contains some text written into it .write a function named vowelwords(), that reads the file first.txt and creates a new file named second.txt ,to contain only those words from the file first.txt which start the lowercase vowel (a,e,i,o,u).


For m = 6 and n = 5, write a C++ code to accomplish the above


The results from search engines cannot be relied upon.’ Carry out any additional research you need in
order to discuss whether or not you think this statement is true

The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound.

Declare a const named CENTS_PER_POUND and initialize with 25.

Get the shipping weight from user input storing the weight into shipWeightPounds.

Using FLAT_FEE_CENTS and CENTS_PER_POUND constants, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds.


#include

using namespace std;


int main() {

int shipWeightPounds;

int shipCostCents = 0;

const int FLAT_FEE_CENTS = 75;


/* Your solution goes here */


cout << "Weight(lb): " << shipWeightPounds;

cout << ", Flat fee(cents): " << FLAT_FEE_CENTS;

cout << ", Cents per lb: " << CENTS_PER_POUND << endl;

cout << "Shipping cost(cents): " << shipCostCents << endl;


return 0;

}


Using the code stub below, compute the acceleration of gravity for a given distance from the earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of gravity is: (G * M) / (d2), where G is the gravitational constant 6.673 x 10-11, M is the mass of the earth 5.98 x 1024 (in kg) and d is the distance in meters from the earth's center (stored in variable distCenter).

#include

using namespace std;

int main() {

double G = 6.673e-11;

double M = 5.98e24;

double accelGravity;

double distCenter;

cin >> distCenter;

/* Your solution goes here */

cout << accelGravity << endl;

return 0;

}


given a number of mangoes and number of persons. Find the number of ways to distribute identical mangoes among identical persons in c++

Given sphereRadius, compute the volume of a sphere and assign sphereVolume with the result. Use (4.0 / 3.0) to perform floating-point division, instead of (4 / 3) which performs integer division. Volume of sphere = (4.0 / 3.0) π r3 (Hint: r3 can be computed using *)

#include

#include

#include


using namespace std;


int main() {

double sphereVolume;

double sphereRadius;


cin >> sphereRadius;


/* Your solution goes here */


cout << fixed << setprecision(2) << sphereVolume << endl;


return 0;

}


LATEST TUTORIALS
APPROVED BY CLIENTS