Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

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

write a function to calculate the n power m using loop


You

are required to design a software for a vehicle showroom to manage its

activities in C++. Given the following requirements:


 


The showroom has a name, address

and sales tax number. The showroom sells cars and trucks. Car has a

manufacturer, model and number of doors, truck has a manufacturer, model and

loading capacity.

  •  Please decide which classes would be needed and what would be the relationship between those classes.
  •  Write the interface of the classes decided above .

Write down the Boolean Table AND the Boolean Expression that models

the circuit that engineers two light switches A and B at the two EXITS

of a huge conference center. The specifications are as follows: (a)

Both light switches operate the one common light in the room.


(b) The light is off when both switches A and B are OFF. That would

mean that A = B = 0 implies the light is OFF = 0.


(c) Flipping either switch will turn the light ON = 1.


(d) Following (c) flipping either switch will turn the light OFF = 0.


(e) We can go back and forth between (c) and (d). Flipping either

switch A or B will turn the light OFF = 0 if it is ON = 1 and ON = 1

if it is OFF = 0. 


You have been given an encrypted copy of the Final exam study guide here, but how do you decrypt and read it???

Along with the encrypted copy, some mysterious person has also given you the following documents:

helloworld.txt -- Maybe this file decrypts to say "Hello world!". Hmmm.


Write a program that prints the result of rolling one fair dice.

Hint: use the rand() function with range given in arguments to generate a random integer in the desired range.

Add a loop to print the sum of rolling 10 fair dice.

Add a second loop to repeat this N times, printing the sum after each trial.

Maintain an array count[] so that count[k] stores the number of times the sum is exactly k.

Review your code and eliminate glitches and unnecessary repetitions if any.


Using a random number generator, create an array of 1000 integers. Apply bubble sort, insertion sort, selection sort, quick sort, and merge sort on that array. Calculate the execution time of sorting algorithms on the array. Write a report on the performance of these sorting algorithms based on your experimentation.


Given a sentence as input, print all the unique combinations of the words of the sentence, considering different possible number of words each time (from one word to N unique words in lexicographical order).Input


The input will be a single line containing a sentence.Output


The output should be multiple lines, each line containing the unique combination from one word to N words in lexicographical order.Explanation


For example, if the given sentence is "apple is a fruit".

All possible one-word unique combinations are

a
apple
fruit
is


All possible two words unique combinations are

a apple
a fruit
a is
apple fruit
apple is
fruit is


All possible three words unique combinations are

a apple fruit
a apple is
a fruit is
apple fruit is


All possible four words unique combinations are

a apple fruit is

Sample Input 1

apple is a fruit

Sample Output 1

a

apple

fruit

is

a apple

a fruit

a is

apple fruit

apple is

fruit is

a apple fruit

a apple is

a fruit is

apple fruit is

a apple fruit is


Given a sentence as input, print all the unique combinations of N words in lexicographical order.Input


The first line of input will be containing a sentence.

The second line of input will contain a positive integer.Output


The output should be multiple lines, each line containing the unique combination of N words in lexicographical order.Explanation


For example, if the given sentence is "apple is a fruit", and N is 3, the possible unique combination of three words are (a, apple, fruit), (a, apple, is), (a, fruit, is), (apple, fruit, is). So the output should be

a apple fruit
a apple is
a fruit is
apple fruit is

Sample Input 1

apple is a fruit

3

Sample Output 1

a apple fruit

a apple is

a fruit is

apple fruit is

Sample Input 2

raju plays cricket

2

Sample Output 2

cricket plays

cricket raju

plays raju





Define a Function in C++.


Given a sentence as input, print all the unique combinations of three words in lexicographical order.Input


The input will be a single line containing a sentence.Output


The output should be multiple lines, each line containing the unique combination of three words in lexicographical order.Explanation


For example, if the given sentence is "apple is a fruit", the possible unique combination of three are (a, apple, fruit), (a, apple, is), (a, fruit, is), (apple, fruit, is). So the output should be

a apple fruit
a apple is
a fruit is
apple fruit is

Sample Input 1

apple is a fruit

Sample Output 1

a apple fruit

a apple is

a fruit is

apple fruit is

Sample Input 2

raju plays cricket

Sample Output 2

cricket plays raju




LATEST TUTORIALS
APPROVED BY CLIENTS