The first line will contain a message prompt to input the size of the matrix.
The succeeding lines will prompt for the elements of the matrix.
The last line will contain the word "MAGIC!" if it is a magic square and "Just a square" if it isn't.
The first line will contain a message prompt to input the number of elements.
The second line will contain message prompts for the elements of the array.
The succeeding lines will contain the arranged elements of the array. Make sure to print the numbers in the order in which they appear in the input. In this case, since 6 appeared first before 12, 6 is printed first.
Given two strings N and K. Your goal is to determine the smallest substring of N that contains all the characters in K. If no substring is present in N print no matches found.
Note: If character is repeated multiple times in K, your substring should also contain that character repeated same number of times.
Input: first line contains two strings N and K
Output: string representing the smallest substring as mentioned above
Input1: stealen lent
Output 1: tealen
Input 2: tomato tomatho
Output 2: No matches found
Question :Create a class Account with the following private member variablesData TypeVariable Namechar[]accountNumberdoubleamountchar[]accountHolderUse appropriate Get and Put function to get and display the values for Account classCreate a function calc() to calculate the interest amount as interest_amount=amount*n*r/100, where n is fixed as 5 and r as 3
Write a program to find the sum of odd numbers in first N natural numbers.
Write a function solution that given a three digit integer N and Integer K, returns the maximum possible three digit value that can be obtained by performing at most K increases by 1 of any digit in N
Write a java program on hotels bookings ask the user to book for a single room, double rooms, family of 6 room and the VIP room bookings the time and the cost must be included.
10)adding numbers
Victor has an array of size n.He loves to play with these n numbers.each time he plays with them ,he picks up any two consecutive numbers and adds them. on adding both numbers,it costs him K*(sum of both numbers).
Find the minimum cost of adding all the numbers in the array.
i/p1:size of array
i/p2:elements of array
i/p3:value of K
o/p:return the maximum cost of adding all the numbers of the array.
Ex1:
i/p1:3
i/p2:{1,2,3}
i/p3:2
o/p:18
explanation: There are multiple ways of adding the numbers of an array.
The first way is:1+2=3 cost of adding is 2*3=6.
3+3=6 cost ofadding is 2*6=12
o/p: there are other ways as well,but minimum cost is 18
ex2:
i/p1:4
i/p2:{4,5,6,7}
i/p3:3
o/p:132
explanation:
for minimum cost ,
4+5=9 cost of adding is 3*9=27
6+7=13 cost of adding is 3*13=39
9+13=cost of adding is 3*22=66
Therefore cost is 27+39+66=132
Get the number of reactions (likes/dislikes) generated in each hour of the day in the year 2020.
hour_of_day no_of_reactions
I used to play Digimon.
Now that I'm a programmer and I have this weird passion of digits, I want to combine them both to create the ultimate program: DigitMon!
This DigitMon program would take an integer input and would output the sum of all the digits of the number. For example, if the input is 243, the output would be 9 because 2 + 4 + 3 = 9. In this case, we say that the DigitMon of 243 is 9.
Instructions:
Input
1. Integer to be processed
Output
Enter·n:·243
DigitMon·of·243·is·9