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

3. Write a program with which you can convert a human height given in feet and inches



to centimeters. The program should ask the user to type in his or her height in two



parts: first the height in feet and then the inches part for the height. (A person can



say that his or her height is, for example, 5 feet and 9 inches. That would be 30.48



* 5 + 2.54 * 9 centimeters.



There can be thus two separate input statements in the program. After the program



has received the feet and the inches, it should calculate the corresponding value in



centimeters and print it to the screen.


Write a program that reads lines of text and appends them to a char buffer[1000]. Stop after reading 1,000 characters. As you read in the text, replace all newline characters '\n' with '\0' terminators. Establish an array char* lines[100], so that the pointers in that array point to the beginnings of the lines in the text. Consider only 100 input lines if the input has more lines. Then display the lines in reverse order, starting with the last input line. 


#include<iostream>

using namespace std;

int main(){

double speed = 55;

double hours = 4;

double distance = 0;

double i = 0.5;

while(i<=hours){

distance = distance + (speed / 2);

cout<<i<<endl;

cout<<"Distance:  "<<distance<<endl;

i += 0.5;

}

}


You are given an integer N. For each integer i from 2 to N, assign a positive integer Ali] such that the following conditions hold:

•  For any pair of integers (i, j), if i and j are co-prime, then A[i]! = A[j].

•  The maximum value among all A[i] is the minimum possible.



Please view the full question image from the below link :

https://drive.google.com/file/d/1_XuTnf6ymzvsP7-z0zA5DJnQdchyHTQs/view?usp=sharing

Bob decided to go on a trip. There are total N kids on the trip. There are 3 types of toys - 'Type-I ', 'Type-2', and 'Type-3' available for distribution among N kids. Each of the kids is asked, what kind of toy he prefers from the current lot. If the kid does not like any toy from the current lot, then he or she would get a toy among the remaining types with equal probability.


For Full Instructions and Question Please Use Those Images as reference... Please help


https://drive.google.com/file/d/1b3RT2IBIBMG2Ojob6uGqoDglXHg-Z928/view?usp=sharing





You have given an array A containing N integers. You can do the following operation at most K times:


•  Choose any index i and increase the value of At by 1.

Your task is to find the maximum bitwise OR of the array.

Input format

•  The first line contains an integer T denoting the number of test cases.

•  The first line of each test case contains two space-separated integers N and K.

•  The second line of each test case contains N space-separated integers denoting array A.


Output format


For each test case, print the maximum possible bitwise OR of the array after performing at most K operations in a new line.


Constraints


1 T 100000 1 N 200000

O K le18

O Ai 260


It is guaranteed that the sum of N over T test cases does not exceed le6.


Explanation


For the first test case, we can increase the value of the 5-th index by 2. Thus the A becomes {1, 3, 7, 0, 8, 1}. The bitwise OR of array A becomes 15.


Population limit: 20792

Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.

A university's library has been having electricity issues and students have been struggling to study during nights.


Each light source can illuminate a circle with a radius of r, and there are n tables in the library and the ith table is positioned at point (xi, yi). You have to help the university find the minimum number of light sources (k), such that each table is illuminated by at least 1 light source.



Input format


• The first line contains integers n and r respectively.


• In each of the next n lines, there are two integers representing xi and yi respectively that display the position of the ith table.


Output format


• In the first line of output, print an integer k that represents the number of light sources.



For Full Instructions and Question Please Use Those Images as reference... Please help


https://drive.google.com/file/d/1wWA7nKnFWaG5XgtzzLPymfbuqiIf7WH8/view?usp=sharing




Odd even prime multiples


Humans have finally made contact with aliens from outer space who call themselves Primes. Naturally, each of their individuals loves prime numbers. Their emperor loves the prime number p the most. However, their maths is much more advanced than the version we use on Earth. They have very long numbers with several digits going up to 100 digits. A number is said to be valid for them if it follows the following conditions:


Task

The emperor has sent the message that he will consider humans an intelligent life form if you can tell him the number of valid numbers between L and R (both inclusive). Since the number of such numbers can be too large, you only need to tell the answer modulo (109+7).


For Full Instructions and Note Please Use Those Images as reference... Please help

https://drive.google.com/file/d/1As_XKXCbB2L2zHCMvbDIZfUiN46_QArO/view?usp=sharing

https://drive.google.com/file/d/1XqxcnlhhjqTTLc8PYcfz7tMdW7AFmcKa/view?usp=sharing

Write a program that accepts five numbers from the user and displays the values from lowest to highest. Assume that there are no duplicate values.

LATEST TUTORIALS
APPROVED BY CLIENTS