Given an array storing integers ordered by value, modify the binary search routine to return the position of the first integer with value K in the situation where K can appear multiple times in the array. Be sure that your algorithm is that is, do not resort to sequential search once an occurrence of K is found.
Write a program to take a String name as input then display the name's first and last words as it was and the middle will be only first letter using substring and indexOf.
Example:
Enter a String
Meser chen Rixou xang
Meser c.R. xang
Don't use array and split
Prof. Abhiram has taken an exam of his students. He has stored the marks of students in a dictionary where keys are the student’s name and values in the dictionary are student marks. Now he wants to know the name of students obtained minimum and maximum marks from this dictionary. You need to write a python function Find_Min_Max(A) which takes a dictionary as input parameter and return the name of student pair having minimum and maximum marks in the class as shown in the example.
Example-1
Example-2
Input:
{'Theodore': 19, 'Roxanne': 22, 'Mathew': 21, 'Betty': 20}
Output:
('Theodore', 'Roxanne')
Input:
{'Roudy': 9, 'Alexa': 2, 'Prett': 18, 'Holmes': 22}
Output:
('Alexa', 'Holmes')
An academic department of Information School wants to generate students report for TEN final year students which will be graduated soon. A name list of TEN students and their FOUR scores are stored in arrays. Write a complete C++ program to do the following:
a. Create 5 parallel arrays to store the:
i. TEN students name called studentName
ii. TEN scores for subject CS402 called cs402
iii. TEN scores for subject CS315 called cs315
iv. TEN scores for subject CS607 called cs607
v. TEN scores for subject CS558 called cs558
b. Read input into the arrays and display them.
c. After processing all the information, the program should:
i. Calculate the average marks for each student
ii. Determine how many students are graduated with first class degree, with average score more than 80%.
iii. Display best student with highest score of each subject iv. Display best student with the highest average score to be awarded with chancellor award
create a C++ program using Microsoft Visual Studio to do the following tasks:
Prompt the user for the salary per year and calculate a Christmas bonus based on the number of years worked as follow. Between 1 to 5 years 1% of salary, and more than five years 2% of salary. Any other values should be considered as an error message.
by CodeChum Admin
You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha!
Now, let's try this one more time!
Instructions:
Input
A line containing two integers separated by a space.
5·10Output
A line containing integers separated by a space.
6·8·10by CodeChum Admin
Given the Student class that inherited from the Person class (the same ones from our lesson), construct another class called StudentAssistant. The class inherits from Student. What makes a StudentAssistant different from Student is that they have to render a fixed set number of hours. All student assistants are to render at least 40 hours of duty in a month. This maybe changed at any time by the Administrator.
More Info here, Important!
https://pastebin.com/PKEgsRSQ
2. Fraction/Mixed Fraction
by CodeChum Admin
Given the class Fraction in the code editor. Fill in the operations and display for the class Fraction. For plus and minus, think cross multiplication. times is straightforward, while divide has to do with reciprocals. toString should return the fraction in string format ("nume/deno" - as a String) but if denominator is 1, then the string should just contain the numerator.
More info here, Important!
https://pastebin.com/VRkEAe6g
2. Rectangle
by CodeChum Admin
A rectangle can be formed given two points, the top left point and the bottom right point. Assuming that the top left corner of the console is point (0,0), the bottom right corner of the console is point (MAX, MAX) and given two points (all "x" and "y" coordinates are positive), you should be able to draw the rectangle in the correct location, determine if it is a square or a rectangle, and compute for its area, perimeter and center point.
More details here, Important!
pastebin.com/8NDksx9M
by CodeChum Admin
Construct a class to represent an air conditioning (AC) unit containing the following attributes:
More details here, Important!
https://pastebin.com/yx0z0Tfr