Rearrange numbers in string ?
input = I am 5 years and 11 months 20old6
output = I am 20 years and 11 months 6old5
you have been an integer array A of size N.you need to pfint the number with the value closest to zero.if there are multiple elements print the number with greater value.
Write a C program of fonts using enumeration.
enum designFlags
{
BOLD = 1, ITALICS = 2, UNDERLINE = 3, STRIKE = 4;
};
Runtime Input :
1
Output :
BOLD
Write a C program of fonts using enumeration.
enum designFlags
{
BOLD = 1, ITALICS = 2, UNDERLINE = 3, STRIKE = 4;
};
Runtime Input :
1
Output :
BOLD
What is the python code for making a program exit/close when a user selects the option?
Write an algorithm to determine the average of any five(5) numbers and display the below after: the sum, the product and the average.
6. PGA Golf Scores At a recent PGA tournament (the
Honda Classic at Palm Beach Gardens, Florida) the
following scores were posted for eight randomly
selected golfers for two consecutive days. At a 0.05,
is there evidence of a difference in mean scores for the
two days?
Golfer 12345678
Thursday 67 65 68 68 68 70 69 70
Friday 68 70 69 71 72 69 70 70
Write a C program for printing roll number, name and phone number of a student using function. First declare a structure named student with roll_no, name and phone number as its members and 's' as its pointer variable. Then assign the values of roll number, name and phone number to the structure variable s. In passing by reference, address of structure variable is passed to the function. Now, while defining the function, Pass a copy of the pointer variable 's' as its argument with 'struct student' written before it because the variable which we have passed is of type structure named student.
Runtime Input:
30
Ragav
9998766563
Output:
30
Ragav
9998766563
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 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)
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.Input
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. The words in each line should be lexicographical order and the lines as well should be in lexicographical order. 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 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