Create a file manually with the file name and contents shown below. The file contains records of student
name, age, sex, and favorite subject unit code.
Record.txt
Wong 18 M ATGE3022
John 19 M ATGE2222
Shirley 20 F ATGE2053
Tan 20 F ATGE1234
Lee 21 M ATGE2053
Chin 18 F ATGE2053
Chan 21 M ATGE2053
Write a program that reads the contents of the file and display the following result on the screen:
i) Total numbers of female whose favorite subject unit code is ATGE2053
ii) Total numbers of male whose favorite subject unit code is ATGE2053
input an integer n and then draws a right angle isosceles triangle with asterisks of height n
You are given a positive integer N .
Your task is to print a palindromic triangle of size N .
For example, a palindromic triangle of size is 5:
1
121
12321
1234321
123454321You can't take more than two lines. The first line (a for-statement) is already written for you.
You have to complete the code using exactly one print statement.
Develop a c# windows application for the class circle and write test program to test the circle class.
Develop a c# windows application for the class circle and write test program to test the circle class.
Design a c# console Application that will output the salary sum of two employees
. Your program must do the following :
· Create an abstract data type, Emp. with two private data members Sal. (Type Double) and name (Type String).
· Include a constructor in the Emp class to initialize all private data members with caller-supplied values (in addition to the default constructor!)
· Overload the + operator to return the sum of two Emp objects.
· Your OutPut Should be like:
· Sum of Employees Salary : Shaban, khurrum = 450000.
Apply your knowledge of the .add() operation to help your friend Rupal.
Rupal has a huge collection of country stamps. She decided to count the total number of distinct country stamps in her collection. She asked for your help. You pick the stamps one by one from a stack of N country stamps.
Find the total number of distinct country stamps.
The first line contains an integer N , the total number of country stamps.
The next N lines contains the name of the country where the stamp is from.
Sample Input
7
UK
China
USA
France
New Zealand
UK
France Sample Output
5Explanation
UK and France repeat twice. Hence, the total number of distinct country stamps is 5(five).
You are given a function f(x)=x^2. You are also given k lists. The ith list consists of ni elements.
You have to pick one element from each list so that the value from the equation below is maximized:
s-fx1+fx2................fxk %m
% denotes the element picked from the list . Find the maximized value obtained.
denotes the modulo operator.
Note that you need to take exactly one element from each list, not necessarily the largest element. You add the squares of the chosen elements and perform the modulo operation. The maximum value that you can obtain, will be the answer to the problem.
Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given scores. Store them in a list and find the score of the runner-up.
Input Format
The first line contains n . The second line contains an array a[] of n integers each separated by a space