Given a list of numbers, write a program to print the smallest positive integer missing in the given numbers.Input
The input will be a single line containing numbers separated by space.Output
The output should be a single line containing the smallest missing number from given numbers.Explanation
For example, if the input numbers are 3, 1, 2, 5, 3, 7, 7.
The number 1, 2, 3 are present. But the number 4 is not. So 4 is the smallest positive integers that is missing from the given numbers.
Sample Input 1
3 1 2 5 3 7 7
Sample Output 1
4
Sample Input 2
5 5 2 3 1 8 8 4
Sample Output 2
6
Write a program that asks the user to input a start time and an end time. Your program needs to calculate the elapsed time. Here is a sample run(user’s input is shown in bold)
Sample run 1
Input start time: 4:15
Input end time: 5:05
The elapsed time is 0 hours & 50 minutes.
Sample run 2
Input start time: 11:50
Input end time: 16:05
The elapsed time is 4 hours & 15 minutes.
Make a class BaraBitkaar Add, subtract,multiply and divide a four function in your BaraBitKaar class as follows .
BaraBitKaar Subtract(BaraBitKaar b); Add(BaraBitKaar b);
When this function called in main() like following example: 16byte binary number.
BaraBitKaar p( "01111111111100000000000001111111101010100101111111111111111111111111111111111111111111111111111111111011111101110101111101011011");
BaraBitKaar q( "00111111111100000000000001111111101010100101111111111111111111111111111111111111111111111111111111111011111101110101111101011011");
BaraBitKaar r;
r = p.Add(q); //this is how Add is supposed to be used to add p and q. Notice r receives the return which is of type BaraBitKaar.
r.PrintBinary(); //
should be able to add numbers p and q and put the result in r.
In a University , there are several departments and each department has a head of department who belongs to Faculty. Department have a name , phone extension , specific mailing address and Students that belong to the department. Students can belong to only one Department at a time and Department can have more than one or no Student
Students and faculty have names and unique identification numbers , with address , age , gender and other information. Student studies different Courses offered by University . Faculty teaches these Courses . In each semester one student can take more than one course and Faculty can teach more than one courses . Faculty members can teach in multiple Departments. Each course can be taught by many faculty members or no one Faculty members are also working on multiple research projects. These projects are funded by government and university. One project can have more than one faculty member and one faculty member can work on more than one project
Draw ER diagram
Case study:
The owners of a small computer repair shop would like to keep track of the repair jobs for computers they repair, the items used for each repair job, the labor costs for each repair job, the repairmen performing each repair job, and the total cost of each repair job.
When customers bring their computers in to be repaired, they make a deposit on the repair job and are given a date to return and uplift their computer. Repairmen then perform repairs on the customers’ computers based on the repair job, and detail the labor costs and the items used for each repair job.
When customers return they pay the total cost of the repair job less the deposit, collect a receipt for their payment, and uplift the repaired computer using this payment receipt.
Find the entity and attributes and also draw an ER Diagram of this case
UCP need to design a new computer lab, each computer system is required 10 sq foot of space and the price of each system is 65,000. Write a C++ program to get the length and width of the room from user in foot and find the number of system required and its total cost.
A storage container only contain one and a half metric ton of sugar one metric ton is approximately 1000 kg’s. Write a C++ program in which, take the amount of sugar in kg’s a bag can hold and the price of sugar (per KG). Calculate the number of bags needed to store one and a half metric ton sugar and the price of each bag.
A carpenter wants to make a ladder, but he want to calculate the required wood for it. The distance between each step is 1 foot. Write a C++ program in which, take the length and width of ladder as input from user and calculate the required wood. Price of wood is 500 per foot, now calculate the price of wood as well.
Remove Words
Given a string, write a program to remove all the words with K length.Input
The first line of the input will contain a string A.
The second line of the input will contain 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.
Sample Input 1
Tea is good for you
3
Sample Output 1
is good
Sample Input 2
A gang stood in front of me
2
Sample Output 2
A gang stood front
Prefix Suffix
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