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

For each of the following, write a single statement that performs the specified task. Assume

that double precision variables value1 and value2 have been declared and value1 has been initialized to 0.7254.

a) Declare the variable dPtr to be a pointer to an object of type double.

b) Assign the address of variable value1 to pointer variable dPtr.

c) Print the value of the object pointed to by dPtr.

d) Assign the value of the object pointed to by dPtr to variable value2.

e) Print the value of value2.

f) Print the address of value1.

g) Print the address stored in dPtr. Is the value printed the same as value1’s address? 


In this problem, you are required to use for/while loop only to implement a calculator using ++ (increment) and -- (decrement) operators only. The operations that your calculator shall perform are limited, i.e. addition, subtraction, multiplication, division, remainder and absolute. Your program shall ask the user about the two input values and an operator, and then use the switch-case structure to run the required operation (addition, subtraction, multiplication, division or absolute (symbol ~)).
Prototype are:
• int addition(int n1,int n2);
• int subtraction(int n1,int n2);
• int multiplication(int n1,int n2);
• int division(int num,int denom);
• int remainder(int num,int denom);
• int absolute(int num);

(Polynomial Class) Develop class Polynomial. The internal representation of a Polynomial is an array of terms. Each term contains a coefficient and an exponent, the term 2x4 has the coefficient 2 and the exponent 4. Develop a complete class containing constructor and destructor functions as well as set and get functions. Assume that the polynomial is in one variable and maximum possible degree is 5. The class also provide the following overloaded operator

 

a)      Overload the addition operator (+) add two Polynomials.

b)      Overload the subtraction operator (-) subtract two Polynomials.

c)      Overload the assignment operator assign one Polynomial to another.

d)      Overload the multiplication operator (*) multiply two Polynomials.

e)      Overload the addition assignment operator (+=), (-=), and multiplication assignment operator (*=).

 

 

Rotate Matrix Rings


The below url contains code for Rotate Matrix Rings

https://drive.google.com/file/d/1Kn65dh5pVUlIQShr4w7aHSZVNPPpCASF/view?usp=sharing


In the above url link it contains code while running code this error was showing as below


Enter M: 


Traceback (most recent call last):

 File "main.py", line 1, in <module>

  M = int(input("Enter M: "))

ValueError: invalid literal for int() with base 10: '3 4\r'


And also not coming expected test cases. The test cases are below


Test case 1

Input:-

4 4

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

3

Output:-

13 9 5 1

14 7 11 2

15 6 10 3

16 12 8 4


Test case 2

Input:-

3 4

1 2 3 4

10 11 12 5

9 8 7 6

2

Output:-

9 10 1 2

8 11 12 3

7 6 5 4


We need all test cases can be came when code was run. I want exact outputs for all test cases



The link below is the question

I already try coding it but I can't come up with the output. Can you please help me with it and correct it.

I needed it already. Thank you.


https://www.chegg.com/homework-help/questions-and-answers/create-python-program-would-perform-given-description-program-description-different-countr-q78177521

First part of code:

dict1 = {'a':2,'b':2,'c':2,'d':3,'e':3,'f':3,'g':4,'h':4,'i':4,'j':

5,'k':5,'l':5,'m':6,'n':6,'o':6,'p':7,'q':7,'r':7,'s':7,'t':8,'u':

8,'v':8,'w':9,'x':9,'y':9,'z':9}


def convert(word):

  x = 0

  for i in range(0,len(word)):

    ch = word[i]

    x = x * 10 + dict1[ch]

    return x


Smaller Scores

A group of people(P) are playing an online game. Their scores are stored in the order of their entry time in S. Each integer S[i] corresponds to the score of the person Pi.


For each person Pi you have to report the number of people who played after the person and scored less than the person.


Input

The first line contains a single integer N.

The second line contains N space-separated


Output

The output should contain N space-separated integers representing the number of people who played after the person and scored less than the person.


Explanation

Given S = 13 12 11


Score of P1 is 13.

Score of P2 is 12.

Score of P3 is 11.


The number of people who played after P1 and scored less than 13 is 2(12, 11).

The number of people who played after P2 and scored less than 12 is 1(11).

The number of people who played after P3 and scored less than 11 is 0.


The output is 2 1 0.


Sample Input 1

3

13 12 11

Sample Output 1

2 1 0

Sample Input 2

4

4 3 5 2

Sample Output 2

2 1 1 0



Area of Rectangle

Given an MxN matrix filled with


X's and O's, find the largest rectangle containing only X's and return its area. If there are no Xs in the entire matrix print 0.Input

The first line of input will be containing two space-separated integers, denoting M and N.

The next M lines will contain N space-separated integers, denoting the elements of the matrix.


Output

The output should be a single line containing the area of the maximum rectangle.


Explanation

For example, if the given M, N and elements of matrix are as the following


4 5

X O X O O

X O X X X

X X X X X

X O O X O


The matrix from indices (1, 2) to (2, 4) has the maximum rectangle with

X. So the output should be the area of the maximum rectangle with X, which is 6.


Sample Input 1

4 5

X O X O O

X O X X X

X X X X X

X O O X O


Sample Output 1

6


Sample Input 2

3 3

O X X

O X X

O O O


Sample Output 2

4



We want to design a system for a company to calculate salaries of different types of employees. 

https://ibb.co/swS948B

Every employee has an employee ID and a basic salary. The Commissioned employee has a sales amount and rate. Hourly employee is paid on the basis of number of working hours. A regular employee may have a bonus. You have to implement all the above classes. Write constructor for all classes. The main functionality is to calculate salary for each employee which is calculated as follows: Commissioned Employee: Total Salary=sales amount*rate/100+basic salary Hourly Employee: Total salary=basic salary + pay per hour*extra hours Regular Employee: Total salary= basic salary + bonus You have to define the following function in all classes: float calculateSalary() and run the given main() for the following two cases: 1. when the calculateSalary() in base class is not virtual

2. when the calculateSalary() in base class is made virtual



Design a C program to check whether the given strings are Is a Anagram or is not an Anagram".


Implement a C program to count total number of words in a string. The given input words can be of letters, digits and special character. For example, if "I love India" is given as input, the output should be the total number of words is 3".


LATEST TUTORIALS
APPROVED BY CLIENTS