Elements in the range
You are given three numbers. Check if any of the numbers exist in the range from 10 to 20(including 10 to 20).
input
the first,second and third lines of inputs are the integers.
output
the output should be either True or False
Explanation
Given a = 2,b = 4,c = 16 , 16 is in the range between 10 and 20.
so the output should be True.
sample input 1
2
4
16
sample output 1
True
sample input 2
2
4
6
sample output 2
False
String repetition-4
you are a given string.repeat the same string N times separated by space.
explanation
in the given example the string is messages , N = 3 .
so we have to repeat the string three times.then we get messages messages messages
as output
sample input 1
messages
3
sample output 1
messages messages messages
sample input 2
pop
4
sample output 2
pop pop pop pop
compare last three characters
write a program to check if the last three characters in the given two strings are same.
input
the first and second lines of inputs are the same.
output
the output should be either True or False
Explanation
given strings are apple , pimple. in both strings,the last three characters ple are common.
sample input 1
apple
pimple
sample output 1
True
sample input 2
meals
deal
sample output 2
False
Make Class Students, having
1. Private data items (First Name, Full Name, Address),
2. Public member functions, getData, showData.
3. Main () function
Create Array of objects (students), (maximum 5 students), call member functions
getData, showData const
write a program that asks the user to enter a name and then prints Howdy NAME. Your program should repeat these steps until the user inputs Sage. ["Sam", "Lisa", "Micha", "Dave", "Wyatt", "Emma", "Sage"]
Solve the following problem by showing the design of your solution as an algorithm.
The problem – The program will take two integers from the user, say n1 and n2. It will then print the sum of all numbers between n1 and n2, inclusive. For example, if the user enters 5 and 9, the program will print the value of 5+6+7+8+9. On the other hand, if the user enters 5 and -2, the program will print the value of 5+4+3+2+1+0+(-1)+(-2). Note: Do not assume the user will always enter the smaller number first.
There are multiple (T) bookstores in the area. Each shopkeeper has a list of B integers that represents the cost of each book. You have different pocket money(P) for each bookstore. Write a program to calculate the maximum number of books you can buy in each store with the corresponding pocket money.
Explanation
Given P = 600 and B = [120, 140, 110, 180, 120, 110] with a pocket money of 600, we can buy the books at index 0,1,2,4,5 , whose sum is 120+140+110+120+110 is equal to P.
Given P = 300 and B = [120 110 1300 130] with a pocket money of 300, we can buy the books at index 0,1 whose sum is 120 + 110 and is less than P.
Given P = 100 and B = [220 1000 500 2000] with pocket money of 100, we can't buy any book. So the output should be Retry.
Sample Input1
3
6 100
20 40 10 80 20 10
4 70
20 10 300 30
4 200
220 1000 500 2000
Sample Output1
5
3
Sample Input2
2
8 250
2070 1350 365 2750 30 20 140 240
4 500
1070 2893 2200 39
Sample Output2
3
1
create two variables one containing the uppercase character G and the other with uppercase letter O you can want as long as its a valid name that is accepted in c++ print out the values of the varaiable in alternate order, twice, on seperate lines, using the std::cout function the outpit generated by your code must be the same as that of the sample output
Calculate overall percentage obtained by cadet in different assessments and generate score card.
The program should collect assessment details for cadet and calculate percentage score obtained by cadet for all the assessments .The details collectedand calculated should be used to generate score card.
The exercise contains a class named program with the below given methods.
GetOverallScore() : int
- should take set of assessment cards as parameter.
- Retrieve the maximum score for each assessment type. Assessment type should be an enumeration.
- should return percentage score value as integer for the average calculated.
GenerateScoreCard() : string
AssessmentType : enum
Maximum scores for these assessment types are:
Quiz -50
KBA - 100
Calibration -150
Hackathon -200
- the maximum score must be obtained from the enum values itself
AssessmentCard : struct
Give a detailed account on the relationship between logical and physical design