part1 average in skilllrack
part1 average in skilllrack
part1 average in skilllrack
An odd length string S of Length L is passed as the input.The program must print the string S as two
diagonals.
1 Input Format: the first line will contain S.
Output Format: L lines will contain the pattern .
Boundary Conditions: Length of S is from 3 to 51.
A string S is passed as the input. The program must reverse the order of the words in the string and print
them as the output.
2 Input Format: The first line will contain S.
Output Format: The first line will contain the words in the string S in the reverse order.
Boundary Condition: Length of S is from 5 to 100.
A string S is passed as the input. Two words W1 and W2 which are present in the string S are also [assed
as the input. The program must find the minimum distance D between W1 an W2 in S (in forward or
reverse order) and print D as the output. Input Format:
The first line will contain S.
3 The second line will contain W1.
The third line will contain W2.
Output Format: The first line will contain D-the minimum distance between W1 and W2 in S.
A number N indicating the number of rows in Floyd's triangle is passed as the input. The program must
print the Floyd's triangle pattern.
4 Input Format: The first line will contain N.
Output Format: The first N lines will contain the Floyd's triangle pattern. Boundary Conditions: 3 <= N
<= 50
A string S is passed as the input. The program must print the number of articles (a, an and the) in S.
The string S passed as the input NEED NOT be correct grammatically.
Input Format: The first line will contain S
6 Output Format: The first line will contain the count of articles in S.
Boundary Conditions: The length of the string S will be from 3 to 1000. Each word in S will not be more
than 100 characters.
An array of N integers with non-zero values is passed as the input to the program. The program must print
another array of size N where value at each index will be the product of all values in the input array except
the value at that index in the input array.
Input Format: The first line will contain N integers separated by a space.
7 Output Format: The first line will contain N integers separated by a space.
Boundary Conditions:
The length of the input containing N integers will be from 3 to 100.
The integer values will be from 1 to 100.
Given a string S, the program must print the count of sub palindromes (with a minimum length of two
characters) in the string S.
Boundary Conditions: Length of the string is between 2 and 200.
8 Input Format: First line will contain the string value S.
Output Format: First line will contain the integer which represents the count of sub palindromes in the
string S.
To encrypt messages Jil will first decide on the number of columns C to use. Then Jil will pad the message
with letters chosen randomly so that they form a rectangular matrix. Finally Jil will write down the message
navigating the rows from left to right and then from right to left.
The program must accept the encrypted message M as input and then extract and print the original
message (along with any additional padding letters) from the encrypted one based on the value of C.
9 Boundary Conditions: Length of M is from 4 to 200.
2 <= C <= 20
Input Format: First line will contain the string value of the encrypted message M.
Second line will contain the integer value of the column used for the encryption.
Output Format: First line will contain the string value of the original message (along with any additional
padding letters)
Two soccer teams A and B play a series of matches over a period of time. In a match, the winning team gets
3 points. If the match ends in a tie (draw) with both teams scoring same goals, then both the teams get one
point each. The losing team does not get any point.
The program must accept the goals scored by both team A and B in certain number of matches and print
10 the cumulative scores of team A and B separated by a space. Input Format:
First line will contain the goals scored by team A, with the goal values separated by a space.
Second line will contain the goals scored by team B, with the goal values separated by a space.
Output Format: First line will contain the scores of team A and B separated by a space.
Boundary Conditions: The length of the input with the space separated goals is from 3 to 100.