We Filipinos are quite known for the habit of leaving at least one of the many pieces of food on the plate as it can't be equally divided among all at most times. Just like when 3 people decide to eat a pizza of 10 slices, there will often be at least one slice left on the box. To accurately show just how many pieces of things are left when divided by a certain number, we code it using modulo.
Care to do it for me?
Input
A line containing two integers separated by a space.
10·3
Output
A single line containing an integer.
1
NOTE: There are several test cases with different input and output that contain integers only.
. Given a number N, create a 2D arrays with n rows and n columns. Now inspect the matrix pattern below and come up with a formula to populate the array for any give NXN matrix.
Create a java program that initialize a two dimensional array with the continuous assessment marks used to determine the semester mark for PRG510S exam qualification, The system should also create an array of student names in correspondence to the marks (Note: the appropriate weights of each individual assessment are given under corresponding headings and both the marks and student names are read from the user input)
Output1: Student Semester mark Qualifies for Exam? --------- ------------------- ----------------------- John 66 YES Harry 50 YES Uushona 38 NO Sililo 30 NO Qualifying mark is 50 and above.
Write a java program that accepts given n number of marks for a PRG510 test, and stores them into an array named marks. After all marks have been entered your program should accomplish the following: [n - to be provided by user input] a) Find and display the highest mark b) Find and display the lowest mark c) Compute and display the average mark (Above tasks (a, b, and c should be accomplished using only one loop)
Sample Run1 Enter numbers of marks:
10 Enter 10 marks: 55 60 89 75 25 77 92 15 68 40
Output1:
Highest Mark = 92%
Lowest Mark =
15% Average = 58%
Write a java program that specifies three parallel one dimensional arrays name length, width, and area. Each array should be capable of holding a number elements provided by user input. Using a for loop input values for length and width arrays. The entries in the area arrays should be the corresponding values in the length and width arrays (thus, area[i] = length [i]* width [i]) after data has been entered display the following output: Length Width Area -------- -------- ------- 25 2.6 65.00 18.2 4.9 89.18 Sample Run1 Enter the array size: 5 Enter the Length and Width for Rectangle 1: 25 2.6 Enter the Length and Width for Rectangle 2: 18 4.9 Enter the Length and Width for Rectangle 3: 100 3.27 Enter the Length and Width for Rectangle 4: 1.84 7.4 Enter the Length and Width for Rectangle 5: 56 9.5 Output1: Length Width Area -------- -------- ------- 25 2.6 65.00 18.2 4.9 89.18 100 3.27 327.00 1.84 7.4 13.62 56 9.5 532.00
: Write a program which inputs a positive integer n and outputs an n line high triangle of '*' characters whose right-angle is in the bottom left corner
Consider an array MARKS[20][5] which stores the marks obtained by 20 students in 5 subjects. Now write a program to
(a) find the average marks obtained in each subject.
(b) find the average marks obtained by every student.
(c) find the number of students who have scored below 50 in their average.
(d) display the scores obtained by every student.
Write a program which inputs a positive integer n and outputs an n line high triangle of '*' characters whose right-angle is in the bottom left corner. For example, if 5 is input the output should be
Problem #4
Var x;
While (x <=5) {
Print ();
x = x + 1;
}
What is the answer?
1. If x = 3
Answer =
2. If x = 1
Answer =