Create a class called CarPark that has the members CarRegnno(int), ChargePerHour(int) and
ParkingDuration(float). Set the data and show the charges and parked hours of a car based on
CarRegnNo. Make two member functions for setting and showing the data. Member function should
be called from other functions.
Consider an Mary QAM constellation with symbol spacing of the
constituent PAM constellations given by, unit pulse energy,
transmitted over an AWGN channel with PSD No 2 No2 per IQI,Q
channels What is the probability of error given the transmission
of a constellation point on the edge of the square constellation
but not a corner point
Rearrange Numbers in String
Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with decimal part.
The input will be a single line containing a string.
The output should be a single line containing the modified string with all the numbers in string re-ordered in decreasing order.
For example, if the given string is "I am 5 years and 11 months old", the numbers are 5, 11. Your code should print the sentence after re-ordering the numbers as "I am 11 years and 5 months old".
Sample Input
I am 5 years and 11 months old
Sample Output
I am 11 years and 5 months old
Ali has decided to go Online with his fast food store. You have been hired by him to make a system for its sale of fast food items.
To create this program you have to create a C++ Program. The information that you are dealing with is name of Food item, category of Food (Desi, italian) price of Food item and stock to know how much the Food item is present in the stock.
First you need to create a menu which has the following options:
1. Add a new Food item.
2. Buy a Fruit item and display it.
a. Upon buying the fruit item should get decreased by the quantity bought.
b. If the quantity bought is 2, stock should be decreased by 2.
3. Display fruits that have stocks lower than 10.
4. Display Least expensive fruit Item from the list.
Write a program to create a class Name with data member as char array. Write a member
function to erase a particular character from the given input C++ string.
You are given a square matrix A of dimensions NxN. You need to apply the below given 3 operations on the matrix A.
Given a sentence as input, find all the unique combinations of two words and print the word combinations that are not adjacent in the original sentence in lexicographical order
For example, if the given sentence is "python is a programming language", the possible unique combination of two are (a, is), (a, language), (a, programming), (a, python), (is, language), (is, programming), (is, python), (language, programming), (language, python), (programming, python). Out of these the combinations, (a, is), (a, programming), (is, python), (language, programming) are not valid as they contain words that are adjacent in the given sentence. So the output should be
a language
a python
is language
is programming
language python
programming python
input: input:
raju always plays cricket to be or not be
output: output:
always cricket be be
cricket raju be not
plays raju or to
to to
it should satisfy both inputs and hidden testcases?
so,can anyone make code for this?
Given a range represented by two positive integers L and R. Find the number lying in the range having the maximum product of the digits. (Inclusive of L and R).
For example, if the given T is 2, read the L and R of the first test case in the next line. If the given L and R are 1 and 10 respectively. As 9 is the maximum product of digits, so the output for the first test case is 9.
If the L and R are 15 to 30 respectively. The product of the digits of number 29 is 18. As 18 is the maximum product in the range, so the output should be 18.
input:
2 1
1 10
15 30
output:
9
29
write a c++ program to sort a given set of values your program should overload the function sort so that the same function can be used for sorting values of numeric data type the sort function calls another function called swap which swaps any two values this function can be implemented as a generic function so that it can swap values of any data type. the no of values to be sorted is known only at runtime add appropriate member functions call the function sort using function pointers the values to be sorted are passed as an array to the function
Given a matrix of order M*N and a value K, write a program to rotate each ring of the matrix clockwise by K elements. If in any ring has less than or equal to K elements, then don’t rotate that ring
For example, if the given M and N are 4 and 4 respectively. If the matrix elements are
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
If the given K is 3. Rotate each ring of the matrix by 3 elements.
In the above matrix, the elements (1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5) is a ring, similarly, the elements (6, 7, 11, 10) will make a ring.
Therefore, by rotating each ring in clockwise direction by 3 elements will give (13, 9, 5, 1, 2, 3, 4, 8, 12, 16, 15, 14) and (10, 6, 7, 11). So the output should be
13 9 5 1
14 7 11 2
15 6 10 3
16 12 8 4
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 there should be no space before starting index line by line