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

Given a string, write a program to remove all the words with K length.




Input




The first line of input String A.



The second line of input an integer K.




Output




The output should contain a string after removing all the words whose length is equal to K.




Explanation




For example, string A is "Tea is good for you", k is 3 then output should be "is good."



Here words "Tea","for","you" length is equal to 3, so these words are removed from string.




Expression for calories burned during workout

Suppose that you have a computer with a memory unit of 24 bits per word. In this computer, the assembly program’s instruction set consists of 198 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory.

a. How many bits are needed for the opcode?

b. How many bits are left for the address part of the instruction?

c. How many additional instructions could be added to this instruction set without exceeding the assigned number of bits? Discuss and show your calculations.

d. What is the largest unsigned binary number that the address can hold?


Look at the following code and identify what is wrong with it:

 

void multiply(int, int);

 

int main() {

  std::cout << "The answer is: " << multiply(num1, num2);

}

 

void multiply(int a, int b) {

  return a * b;

}

 

Prototype is missing variable names

Int parameters should be doubles

Void functions cannot return a value

Value-returning functions must be called in a statement that stores the returned value in a variable


This program will calculate the average(%) of exam grades.

It will also add extra credit points to the exam average given the course difficulty.

Enter all of the grades for one student. Type (-1) when finished with that student.

If you have additional students, you will be prompted to repeat the program at the end.

 

Enter an exam grade (type -1 to quit):  user types: ten

Error: Grades must be an integer 0 or higher.

Enter an exam grade (type -1 to quit):  user types: 100

Enter an exam grade (type -1 to quit):  user types: 50

Enter an exam grade (type -1 to quit):  user types: -1

 

Exam average, including extra credit, is: 78

The equivalent letter grade is: C

Would you like to enter grades for another student (Y or N)?  user types: N


This program will calculate the average(%) of exam grades.

It will also add extra credit points to the exam average given the course difficulty.

Enter all of the grades for one student. Type (-1) when finished with that student.

If you have additional students, you will be prompted to repeat the program at the end.

 

Enter an exam grade (type -1 to quit):  [user types: 100]

Enter an exam grade (type -1 to quit):  [user types: 90]

Enter an exam grade (type -1 to quit):  [user types: 80]

Enter an exam grade (type -1 to quit):  [user types: -1]

 

Exam average, including extra credit, is: 93


Melokuhle is a very young intelligent and adventurous individual. He has recently bought 4 quantums (taxi) to transport people around the country. As a result, he is planning a trip to Upington. Therefore, he has hired you to write a program in pseudocode as well as in C++ to evaluate the fuel consumption on his 4 cars during the planned trip. The kilometers and fuel level in the tank at the start and end of the journey should be entered by the end-user. Calculate for each car, the fuel used, kilometers traveled, and the overall fuel consumption in kilometers traveled per litre of fuel.


Melokuhle is a very young intelligent and adventurous individual. He has recently bought 4 quantums (taxi) to transport people around the country. As a result, he is planning a trip to Upington. Therefore, he has hired you to write a program in pseudocode as well as in C++ to evaluate the fuel consumption on his 4 cars during the planned trip. The kilometers and fuel level in the tank at the start and end of the journey should be entered by the end-user. Calculate for each car, the fuel used, kilometers traveled, and the overall fuel consumption in kilometers traveled per litre of fuel.


Melokuhle is a very young intelligent and adventurous individual. He has recently bought 4 quantums (taxi) to transport people around the country. As a result, he is planning a trip to Upington. Therefore, he has hired you to write a program in pseudocode as well as in C++ to evaluate the fuel consumption on his 4 cars during the planned trip. The kilometers and fuel level in the tank at the start and end of the journey should be entered by the end-user. Calculate for each car, the fuel used, kilometers traveled, and the overall fuel consumption in kilometers traveled per litre of fuel.


Design & Implement a C- program that can handle salesmen records of ABC


Company. Each salesman has unique 4-digit id #, name, salary, monthly sale &


commission (commission is computed depending on value of monthly sale). Net


income of a salesman is salary plus commission. Make maximum use of user


defined Functions.


Conditions for calculating commission are as follows:


➢ Commission is 20% of monthly sale, if sale is equal to or greater than 15,000.


➢ Commission is 15% of monthly sale, if sale is equal to or greater than 10,000


and less than 15,000.


➢ Commission is 10% of monthly sale, if sale is equal to or greater than 8,000


and less than 10,000.


➢ Commission is 5% of monthly sale, if sale is equal to or greater than 5,000 and


less than 8,000.


➢ No Commission, if sale is less than 5,000.



LATEST TUTORIALS
APPROVED BY CLIENTS