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

Write a program to check the overlapping of one string's suffix with the prefix of another string.Input

The first line of the input will contain a string A.

The second line of the input will contain a string B.Output

The output should contain overlapping word if present else print "No overlapping".Explanation

For example, if the given two strings, A and B, are "ramisgood" "goodforall"

The output should be "good" as good overlaps as a suffix of the first string and prefix of next.

Sample Input 1

ramisgood

goodforall

Sample Output 1

good

Sample Input 2

finally

restforall

Sample Output 2

No overlapping



Given polynomial, write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0 format.

Input

The first line contains a single integer N.

Next N lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes coefficient of Pi.

Output

Print the polynomial in the format Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0, where Pi's are powers in decreasing order, Ci is coefficient, and C0 is constant. There will be space before and after the plus or minus sign.

If the coefficient is zero, then don't print the term.

If the term with the highest degree is negative, the term should represent -Cix^Pi.

For the term where power is 1, represent it as C1x instead of C1x^1.

If the polynomial degree is zero and the constant term is also zero, then print 0 to represent the polynomial.

For term Cix^Pi, if the coefficient of the term Ci is 1, print x^Pi instead of 1x^Pi.

Sample Input:1 Sample Input2:

5 4

0 2 0 5

1 3 1 0

2 1 2 10

4 7 3 6

3 6

Output: Output: 6x^3 +10x^2+5

7x^4 + 6x^3 + x^2 + 3x + 2

Define a class REPORT with the following specification:

Private members :

adno 4 digit admission number

name 20 characters

marks an array of 5 floating point values

average average marks obtained

GETAVG() a function to compute the average obtained in five subject

Public members:

READINFO() function to accept values for adno, name, marks. Invoke the

function GETAVG()

DISPLAYINFO() function to display all data members of report on the screen.

You should give function definitions.


Define a class BOOK with the following specifications :

Private members of the class BOOK are

BOOK NO integer type

BOOKTITLE 20 characters

PRICE float (price per copy)

TOTAL_COST() A function to calculate the total cost for N number of copies where

N is passed to the function as argument.

Public members of the class BOOK are

INPUT() function to read BOOK_NO. BOOKTITLE, PRICE

PURCHASE() function to ask the user to input the number of copies to be

purchased. It invokes TOTAL_COST() and prints the total cost to be paid by the user.

Note : You are also required to give detailed function definitions.


Define a class in C++ with following description:

Private Members

A data member Flight number of type integer

A data member Destination of type string

A data member Distance of type float

A data member Fuel of type float

A member function CALFUEL() to calculate the value of Fuel as per the following

criteria

Distance Fuel

<=1000 500

more than 1000 and <=2000 1100

more than 2000 2200

Public Members

A function FEEDINFO() to allow user to enter values for Flight Number, Destination,

Distance & call function CALFUEL() to calculate the quantity of Fuel

A function SHOWINFO() to allow user to view the content of all the data members


Define a class TEST in C++ with following description:

Private Members

TestCode of type integer

Description of type string

NoCandidate of type integer

CenterReqd (number of centers required) of type integer

A member function CALCNTR() to calculate and return the number of centers as

(NoCandidates/100+1)

Public Members

A function SCHEDULE() to allow user to enter values for TestCode, Description,

NoCandidate & call function CALCNTR() to calculate the number of Centres.

A function DISPTEST() to allow user to view the content of all the data members.


memory management within an operating system


Create a software that has multiple features to handle books management.Book shop have 100 books for customers.The shop gives book on rent and charge per day according to type of book.Write a main function that will display these options 1.Rent a Book 2.Calculate total amount of all currently Rented Books 3.Exit the program.Ask Repeatedly by showing menu unless user exit program Create Structure to store this data for each book I.e (for 100 books) Book Id, Book name, Customer name, Type of book (Novel=2000, Academic=1500, Philosophy=2000, Islamic=1000) , No of days.Create a Structure array of Books for 100 Books data.Program should calculate total fee of all rented books in shop currently to keep.You need to firstly calculate fee for each book separately by checking their days and then finally you have to calculate all amount of currently rented books.Also show customer name of book who have payed most amount. Finally get count of available book along with type and display.



Create software that has multiple features to handle books management. Book shop have 100 books for customers.The shop gives book on rent and charge per day according to type of book.Write a main function that will display these options 1.Rent a Book 2.Calculate total amount of all currently Rented Books 3.Exit program.Ask Repeatedly by showing menu unless user exit program Create Structure to store this data for each book I.e (for 100 books) Book Id, Book name, Customer name, Type of book (Novel=2000, Academic=1500, Philosophy=2000, Islamic=1000), No of days.Create a Structure array of Books for 100 Books data.Program should calculate total fee of all rented books in shop currently to keep.You need to firstly calculate fee for each book separately by checking their days and then finally you have to calculate all amount of currently rented books. also show customer name of book who have payed most amount. Finally get count of available book along with type and display.


Create a software that has multiple features to handle books management. Book shop have 100 books for customers. The shop gives book on rent and charge per day according to type of book. Write a main function that will display these options 1. Rent a Book 2.Calculate total amount of all currently Rented Books 3 .Exit the program. Ask Repeatedly by showing menu unless user exit program Create Structure to store this data for each book I.e (for 100 books) Book Id, Book name, Customer name, Type of book (Novel=2000, Academic=1500, Philosophy=2000, Islamic=1000) , No of days. Create a Structure array of Books for 100 Books data. Program should calculate total fee of all rented books in shop currently to keep. You need to firstly calculate fee for each book separately by checking their days and then finally you have to calculate all amount of currently rented books. As well as show customer name of book who have payed most amount. Finally get count of available book along with type and display.



LATEST TUTORIALS
APPROVED BY CLIENTS