create a program using selection control structure particularly if else statement that will input 3 numbers and will output which one has the smallest value
Numbers in String - 2
Given a string, write a program to return the sum and average of the numbers that appear in the string, ignoring all other characters.Input
The input will be a single line containing a string.Output
The output should contain the sum and average of the numbers that appear in the string.
Note: Round the average value to two decimal places.Explanation
For example, if the given string is "I am 25 years and 10 months old", the numbers are 25, 10. Your code should print the sum of the numbers(35) and the average of the numbers(17.5) in the new line.
Sample Input 1
I am 25 years and 10 months old
Sample Output 1
35
17.5
Sample Input 2
Tech Foundation 35567
Sample Output 2
35567
35567.0
As a member of the IT team, you have been asked to configure user access and prevent employees from accessing the hard drive and printer. The following day, you receive 50 emails from users complaining of broken computers since none of them can print from their computer any longer. You know this is by design and was the intent of the new system configurations, but also understand many users may have concerns with this new process. How would you go about addressing the concerns of the employees? What security issues did the previous configuration have and how would you explain this to those affected by the changes? How could this have been handled differently to make the change in processes easier for the employees to understand?
Triplet Sum
Given an array n integers, find and print all the unique triplets (a, b, c) in the array which give the sum K. (a+b+c=K).Input
The first line of the input will be space separated integers, denoting the elements of the array. The second line of the input will be an integer denoting the required sum KOutput
The output should be multiple lines, each line containing a unique triplet. The elements of the triple must be sorted in increasing order and all the triplets printed must be sorted in increasing order. Print "No Matching Triplets Found" if there are no triplets with the given sum.Explanation
Sample Input 1
0 12 17 8 9 21
29
Sample Output 1
(0, 8, 21)
(0, 12, 17)
(8, 9, 12)
Sample Input 2
0 1 2 3 5 7 13 17 19 19
22
Sample Output 2
(0, 3, 19)
(0, 5, 17)
(1, 2, 19)
(2, 3, 17)
(2, 7, 13)
The output should be printed exactly as shown in the above test cases.
Non-Adjacent Combinations of Two Words
Given a sentence as input, find all the unique combinations of two words and print the word combinations that are not adjacent in the original sentence in lexicographical order.
The input will be a single line containing a sentence.Output
The output should be multiple lines, each line containing a valid unique combination of two words. A valid combination will not contain the words that appear adjacent in the given sentence. Print "No Combinations" if there are no valid combinations_Explanation.
Sample Input 1
raju always plays cricket
Sample Output 1
always cricket
cricket raju
plays raju
Sample Input 2
python is a programming language
Sample Output 2
a language
a python
is language
is programming
language python
programming python
Sample Input 3
to be or not to be
Sample Output 3
be be
be not
or to
to to
The output should be printed exactly as shown in the above testcases.
Rotate Matrix Rings
Given a matrix of order M*N and a value K, write a program to rotate each ring of the matrix clockwise by K elements. If in any ring has less than or equal to K elements, then don’t rotate that ring.Input
The first line of input will be two space-separated integers, denoting the M and N.
The next M lines will contain N space-separated integers.
The next line will contain an integer, denoting K.Output
The output should be M*N matrix by rotating the matrix by K elements.Explanation
Sample Input 1
4 4
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
3
Sample Output 1
13 9 5 1
14 7 11 2
15 6 10 3
16 12 8 4
Sample Input 2
3 4
1 2 3 4
10 11 12 5
9 8 7 6
2
Sample Output 2
9 10 1 2
8 11 12 3
7 6 5 4
Q1. Write a C++ program that takes a positive integer number and displays all the factors of that number . Thus, for example , if number ser = 12 , the program will print 1, 2, 3, 4, 6, 12
1. a) A program has 200 instructions and runs in a processor in 5 ns. If each of the instructions take
10 clock cycles, what is the value of Clock Cycle Time?
b)A program has 125 instructions and total clock cycles consumed by the program is 31.25 ms.
What is the value of cock per instruction?
calculate the perimeter and area of a rectangle; take length = 20 and width = 30 prove your answer using C++ program
Explain two factors that can be important to the business success of a third-party management application vendor that potentially has to compete with a network management offering of a network equipment vendor