Write a C program to print the string and its length using functions
The input file called IncomeRec.txt contains a list of Annual (Gross) income records of employees in a firm. You will assume that this firm contains at most 200 active staff. Each record is on a single line and the fields are separated by a single space. The names of the fields are: • Employee Lastname (initial) - char • FNPF# - integer • Age - integer • Gross_Income - integer • Resident - char An example record may have the following form: F 12345 24 40000 Y And the format of the actual file is shown below. (Note: This doesn’t show all records and for clarity, fields here are shown separated by tabs, but in the actual file they are separated by single spaces) Note: ▪ The first two lines are just header lines and can be discarded ▪ Lastname contains an initial, an alphabetical letter only; ▪ FNPF# contains a 5 digit number; ▪ Gross income contains a 3-7 digit number; ▪ Resident contains a ‘Y’ or ‘N’, representing resident or non-resident respectively
Loop to ask user to 30 integer
void student(string s ,ifstream &in)
{
// read each line and compare the name s
}
int main()
{
string s; cin>>s; // input string
ifstream in;
in.open("Text1.txt");
student(s, in);
system("pause");
return 0;
}
write a program that reads input file called IncomeRec.txt, The input file contains a list of Annual (Gross) income records of employees with at most 200 staff. Each record is on a single line and the fields are separated by a single space. The names of the fields are: • Employee Lastname (initial) char
• FNPF# - integer
• Age - integer
• Gross_Income - integer
• Resident - char
Requirements
1. Print the entire list. by typing 1 and should print the contents of the file on the screen. (fileds output are: lastname initial, FNPF#, age, Gross_Income and Resident)
2. Print list sorted by Gross Income by typing 2. Program prints the list in ascending order of Gross Income. ( fields output are: FNPF# and Gross_Income)
3. Print list of employees which match a given lastname initial typing 3. the user is asked to enter the search initial. if no person have last names matching the search initial “no matching record found” is displayed. to display in output are: lastname and FNPF#
Write a c++ program that reads in 10 midday temperatures for Port Elizabeth, for 10 consecutive days. Only temperatures higher than 0 and less than 45 are valid (working with integer values for temperatures). It must calculate and display the following: The warmest temperature The average temperature. The number of days that the temperature was higher than 30.
Management of Goodwill Pharmacy have approached your group to develop an application that prints receipts of Medication purchased by customers. Write a JAVA program to generate a receipt [using the sample below] for the medication sold as Goodwill Pharmacy.
The application should;
i. accept as inputs the ITEM(S), QUANTITY, DISCOUNT, UNIT PRICE, TOTAL, TAX RATE, VAT, NET VALUE, and CASH PAID.
ii. calculate TOTAL AMOUNT, BILL TOTAL, BALANCE
iii.
display the ITEM(S), QUANTITY, DISCOUNT, UNIT PRICE, TOTAL, TAX RATE, VAT, NET VALUE, TOTAL AMOUNT, BILL TOTAL, BALANCE, and CASH PAID [using the sample below].
Print a random number Between 1 and 75 inclusive