Create a program of mathematical that will display the sum, difference, product, quotient of two variables using the interactive input.
How to code procedures in a form to : i. A function that calculates average score. ii. Another function that determines the minimum score. iii. And another to determine the maximum score.
how to code button titled Open Student Details File.
When this button is clicked, do following: a) Open and read StudentDetails.txt and store the data into a StudentDetails structure array.
code for:
Put a button titled Open Answers File. When this button is clicked; open Answer.txt, and read and store the answers in an array of Strings. Close this file.
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)
Give me exact output of this question sir
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
Therefore, by rotating each ring in clockwise direction by 3 elements will give (13, 9, 5, 1, 2, 3, 4, 8, 12, 16, 15, 14) and (10, 6, 7, 11). So the output should be
4 8 12 16
3 10 6 15
2 7 11 14
1 5 9 13
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
give exact output this question
1. Using implicit sizing, assign the integers 2, 3, 5, 7, 11, and 13 to an array named intPrimeNumbers. (1 mark)
2. Answer the following questions about the following initialized array: Dim strSeafood(8) as String (2.5 marks)
a. Assign Oysters to the first array location. What is the index number?
b. Assign Lobster to the fourth location in the array. What would the assignment statement look like?
c. What value does strSeafood.Length have?
d. How many types of seafood can this array hold?
e. What would happen if you assigned strSeafood(9) = “Red Snapper”?
3. Rewrite the code below to read each line of a text file into an array named strFordModel. ( 0.5 marks)
4. Write a For Each loop that displays every element of an array named strSongNames in a ListBox named lstDisplay. The loop variable is named strPlay. (1 Mark)
create
1. MainMenu form having :
a) button Open Answers File. When button is clicked; open Answer.txt, and read and
store the answers in an array of Strings. Close this file.
b) 2nd button Open Student Responses File. When button is clicked, do following: i. Open StudentResponses.txt file.
ii. Read number of students who sat the exam value and store it a variable.
iii. Then use loop to read student’s responses to questions. This loop runs up to number of students who sat the exam value read in i). For each line read, split record into an Exam Structure array that has an ID and responses field.
c) button titled Open Student Details File. When this button is clicked, do following:
a) Open and read StudentDetails.txt and store data into a StudentDetails structure array.
d) button titled Display Grades Results when clicked, should open up another form titled Grades Results Sheet on which in label should display grades results for class
Write a c++ program for inventory management system for a small convenient store
Java practical 1
It has been realized that hackers have started hacking and changing the account detains of some banks, to stop this practice, you have been tasked to create a class called Abaaneke, your class should contain three private variables (deposit, oldBalance, newBalace) all of type float and a variable of type String (name of the account holder)
Your class should also have a method that takes three arguments – name of account holder, amount deposited and old balance. The method should add the deposit to the oldBalance and call it new balance.
Using the right setters and getters, initialize the private variables and call the method to display the following
a. Account holders name
b. Amount deposited
c. Old balance
d. And new balance