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

program to find sum of non-diagonal elements of matrix of MxM

Input: 
3
9 8 7
6 5 4
3 2 1

Output: 20




in the example the first test case number is 9966777819 and this number should be divided into 4 3 3 format

the first divided part should be read a double nine double six. As there are two consecutive 9's,it should be read as double nine.similarly there are two consecutive 6's it should be read as double six

in the second divided part there are three consecutive 7's it should be read as triple seven.

In the third divided part there are no consecutive digits each digit should be read separately.

sample input1

9966777819

sample output1

double nine double six triple seven eight one nine

sample input 2

7299613014

sample output 2

seven two double nine six one three zero one four


You are given a sentence Nice day Write a program to replace each letter with the previous letter in the english alphabet

You are given a string containing ten digits, write a program to print these digits in a human readable format.



There are some rules to how to read a number,



1. Divide the ten digit number into set of four-three-three digits



2.use the following prefixes for consecutive digits



# Single numbers just read them seperately



# 2 successive numbers use double



# 3 successive numbers use triple



# 4 successive numbers use quadruple

in the example the given list of strings are raju ,plays,golf

the word plays has the maximum number of distinct letters so the output should be plays

sample input 1

raju plays golf

sample out put 1

plays

sample inpput 2

Drink four liters of water every day

sample output 2

liters


swap most frequent letter with least given a sentence, swap the occurrences of the most frequenti with the least frequent letter and vice-versa. submisdong note: • consider upper and lower case letters as different . if there are multiple letters with the same frequency, choose the lower case letter that comes earliest in dictionary order o if letters like x and b have same frequency consider x o if letters like x and b have same frequency consider b


Construct a class named Complex to represent a complex number with the requirements:

The real and imaginary components are both floats
Function to input real components, virtual components from the keyboard
Function to display information to the screen
Function to take real components, function to assign real components
Function to get virtual components, function to assign virtual components
The function also takes real and imaginary components
The function simultaneously assigns real and imaginary components
Write a main program that illustrates how to use it




You are given a space separated list of integers as input, write a program to replace all non positive numbers in a list with the last positive number encountered

Column Title

You are given a number that denotes a column in the Excel Sheet, write a program to calculate the column name in the Excel Sheet. The naming of columns in the Excel Sheet is as follows

Column Name Column Number

A 1

B 2

C 3

... ...

X 24

Y 25

Z 26

AA 27

AB 28

... ...

BA 53

... ...

ZZ 702

AAA 703

... ...

Input

The first line of input is a positive integer.

Output

The output should be a single line containing the column name.

Explanation

For example, if the given column number is 42.

The column names with single alphabets end at 26. Further column names will contain two alphabets.

Therefore, for the column number 42, the first alphabet in the column name is A and the remaining number is (42-26) is 16.

The second alphabet of the column name is the 16th alphabet, which is P.

So, the output should be AP.


Suppose there is class of 30 students who have attendance between 40- 100%. The university has decided to give the bonus attendance between for those students who have the attendance between 70-74% to make it 75%. Identify the students those have attendance after adding the bonus attendance. Suppose students have its Roll_no & attendance. Add the bonus attendance to the obtained final attendance of student through array. Use functions to solve this tasks.

Input Format -The input should contain a roll_no, and attendance of 25 students.

Output Format-For each test case, display the roll_no and increased attendance of those students only who lies between the obtained attendance of 70-74%.


LATEST TUTORIALS
APPROVED BY CLIENTS