Questions: 9 913

Answers by our 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 & Filtering

Code a C++ program that will display the value of a given variable, and reference to another address, then, the value point-to another address. Given the value of variable is equal to 750.


The XYZ Telephone Company’s charges file, contains records for each call made by its subscribers during a month. Each record on a file contains the subscriber’s name and phone number, the phone number called, the distance from Shah Alam of the number called (in kilometres) and duration of the call in seconds.

Design an algorithm that will read the Tidy Phones charges file and produce a telephone charges report, as follows:

 

The cost of each call is calculated based on table 1.

Distance from Metroville

Cost($)/minute

Less than 25 km

0.35

25 <= km < 75

0.65

75 <= km < 300

1.00

300 <= km <=1000

2.00

Greater than 1000 km

3.00

 

Write C++ complete programs for the above problem. You program must use control structure and user defined function.

 


seconds.

 

As a junior programmer, you are required to design and write a complete C++ program that asked the user to enter subscriber’s name and phone number, the phone number called, the distance from Shah Alam of the number called (in kilometers) and duration of the call-in seconds. The user also needs to enter types of call either Local or International call.

 

The cost of each call is calculated based on Table 1.

 

Distance from Shah Alam

Cost(RM)/minute

 

Local

International

Less than 25 km

0.35

0.55

25 <= km < 75

0.65

0.85

75 <= km < 300

1.00

1.20

300 <= km <=1000

2.00

2.20

Greater than 1000 km

3.00

3.20

 

Your program should use the following:

 

1. Appropriate Control Structure

2. User Defined Function

3. Sets the decimal precision to be used to format floating-point values on output operations. (2 decimal places)

4. Set background and text colour for output


1. Write C++ program, overload the unary decrement operator (--) , postix nd prefix





2. Write C++ program , overload the binary subtraction operator(-)




Les assume you create a system which asks the user for the number of students and the

number of test scores per student. A nested inner loop, should ask for all the test scores for one

student, iterating once for each test score. The outer loop should iterate once for each student

and take student name as input. After taking input for 3 test scores, calculate average for each

student. Take 3 test scores and 4 students.

Note: use do-while loops


We Filipinos are quite known for the habit of leaving at least one of the many pieces of food on the plate as it can't be equally divided among all at most times. Just like when 3 people decide to eat a pizza of 10 slices, there will often be at least one slice left on the box. To accurately show just how many pieces of things are left when divided by a certain number, we code it using modulo.



Care to do it for me?



Input


A line containing two integers seperated by a space



Output


A single line containing an integer


1

Create Class (PSL), having





1. Data items: M , W , L, T, P





2. Constructors: Defualt, Parameterized, Copy





3. Member functions: getdata(), setData(), showdata() const





4. Static class data: total number of teams (objects) created





5. Constant Object : e.g LQ







 Lets assume you create a system which asks the user for the number of students and the number of test scores per student. A nested inner loop, should ask for all the test scores for one student, iterating once for each test score. The outer loop should iterate once for each student and take student name as input. After taking input for 3 test scores, calculate average for each student. Take 3 test scores and 4 students.

Note: use do-while loops




1. Number of rows


Description

This is the number of rows of the multidimensional array.

2. Number of columns


Description

This is the number of columns of the multidimensional array.

3. Elements of the multidimensional array

Output

The first line will contain a message prompt to input the number of rows.

The second line will contain a message prompt to input the number of columns.

The succeeding lines will contain the elements of the input multidimensional array.

Finally, the last line will contain the position (row, col) of the first element of the consecutive increasing number.

Enter·number·of·rows:·3
Enter·number·of·columns:·4
1·1·2·3
5·8·2·1
3·2·0·5
Position:·0,·1

Using the do…while() loop, continuously scan for random integers, but add up only all the positive integers and store the total in one variable.


The loop shall only be terminated when the inputted integer is zero. Afterwards, print out the total of all inputted positive integers.

LATEST TUTORIALS
APPROVED BY CLIENTS