Write a program that repeatedly asks the user to enter two money amounts expressed in pounds. The program should then add the two amounts and display the answer in pounds. The program should then convert the amount in Rupees. (Set conversion rate: 1£=120.33 rupees). Display the answer in Naira. Use a do-while loop that asks the user whether the program should be terminated.
Write a program that does the following for 15 students:
Reads in 3 marks for each student, however, you need to make provision that the user
might be typing invalid values – when an invalid mark is entered, the user should be prompted to re-enter a valid mark. This should happen continuously until you have three valid marks for each student (valid marks are marks between 0 and 100; 0 and 100 included). Your prompt message to the user should indicate which number is being requested
Calculates and displays the highest mark for each student.
Finds and displays the highest mark in the class.
Adapt your code to also read in the name of each student, and add the name to the display
of the highest mark for each student
When displaying the overall highest mark, the name of the relevant student should also be
displayed.
Update your solution to make use of the getMark method. In this updated version, your prompt messages does
not have to indicate which mark is being requested.
3.1. [10 marks] Write a method with the following details:
3.2. [10 marks] Using the method below, write the statements to call the above method with the masses of the earth, moon and the distance between them and display the resulting force.
- Mass of Earth: 5.972E24
- Mass of Moon: 7.348E22
- Distance: 384,400,000 meters
- Answer: 1.99e020N - You should use “E” as a format specifier in your output (like when you use N, F, N2)
Write a user defined method named getMark that can be used to get a valid mark from the user. Your method must continuously ask the user for a mark, until a valid mark is entered (valid marks are between 0 and 100). If a user enters an invalid mark, display an error message before asking for a valid mark to be entered. The method must return the valid value to the calling program.
Write a user defined method named isPass that can be used to determine whether a mark is a pass mark (greater or equal to 50). The method must take as input a mark, and return a boolean, indicating whether the mark was a pass mark.
Write a program that reads in 5 marks by using the getMark method to ensure that valid marks are processed. You need to calculate the sum and the average of the marks. Your program must also use the isPass method to determine the number of pass marks entered. When the 5 marks have been processed you need to display the sum, average and number of passes (from these marks).
1. [15 marks] Write a new method that will work as the menu of your application. Details:
2. [25 marks] In your Main method, using a “while” loop, not a “do while”, write the code to call the Menu method you have created on question #1 repeatedly.
Using a “switch” structure, write the code to implement the following required functionality for all valid responses. Valid responses includes both upper and lower case of the input. The following must be implemented:
- A will call the DemoQuestion3() method
- B will call the DemoQuestion4() method
- C will call the DemoQuestion5() method
- X will terminate the program
Any other
The number of lines that can be printed on a paper depends on the paper size, the point size of each character in a line, whether lines are double-spaced or single-spaced, the top and bottom margin, and the left and right margins of the paper. Assume that all characters are of the same point size and all lines are either single-spaced or double spaced. Note that 1 inch = 72 points. Moreover, assume that the lines are printed along with the width of the paper. For example, if the length of the paper is 11 inches and width is 8.5 inches, then the maximum length of a line is 8.5 inches. Write a c# .net program that calculates the number of characters in a line and the number of lines that can be printed on a paper based on the following input from the user:
a. The length and width, in inches of the paper
b. The top, bottom, left, and right margins
c. The point size of a line
d. If the lines are double-spaced, then double the point size of each character
Provide a proper GUI for the user.
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.
1- Write a program to demonstrate static variables, methods, and blocks.
2- Write a program in C# Sharp to create a user define function.
3- Write a program in C# Sharp to create a user define function with parameters.
4- Write a program in C# Sharp to create a function to display the n number Fibonacci
sequence.
5- Write a program in C# Sharp to create a function to calculate the sum of the
individual digits of a given number.
Enter a number: 1234
Expected Output:
The sum of the digits of the number 1234 is: 10
6- Write a program to calculate the roots of Quadratic equations using encapsulation.
7- Write a program for calculating Matrix Operations.
1. Addition.
2. Multiplication.
1- Write a program to demonstrate static variables, methods, and blocks.
2- Write a program in C# Sharp to create a user define function.
3- Write a program in C# Sharp to create a user define function with parameters.
4- Write a program in C# Sharp to create a function to display the n number Fibonacci sequence.
5- Write a program in C# Sharp to create a function to calculate the sum of the individual digits of a given number. Enter a number: 1234 Expected Output: The sum of the digits of the number 1234 is: 10.
6- Write a program to calculate the roots of Quadratic equations using encapsulation.
7- Write a program for calculating Matrix Operations. 1. Addition. 2. Multiplication