assign a letter grade based on the test percentage according to the following rules
80 to 100 A
70 to 79 B
60 to 69 C
50 to 59 D
0-49 F
display an appropriate message with the test percentage and letter grade for the student . Accumulate the number and total of all the percentages . after all the input calculate the average percentage from valid percentages entered .display the average percentage, number of passes, number of fails and number of invalid percentages. using for, while and do...while program.
Code a program to get an unknown number of test percentages from the user. Accept percentages until the user enters a percentage of -99. This number ( -99) indicates the end of the data and must not be used as part of the calculations.
Assign a letter grade based on the test percentage according to the following rules:
TEST PERCENTAGE GRADE
From 80 to 100 ‘A’
From 70 to 79 ‘B’
From 60 to 69 ‘C’
From 50 to 59 ‘D’
0 - 49 'F'
Display the test percentage and letter grade for the student.
Count how many pass percentages (50 - 100) and fail (0 - 49) percentages, as well as invalid percentages (below zero and above 100), are entered.
then calculate the average percentage (from the valid percentages entered). Display the average percentage, number of passes, number of fails, and number of invalid percentages.
Code a program to get an unknown number of test percentages from the user. Accept percentages until the user enter a percentage of -99. This number ( -99) indicates the end of the data and must not be used as part of the calculations.
Assign a letter grade based on the test percentage according to the following rules:
TEST PERCENTAGE GRADE
From 80 to 100 ‘A’
From 70 to 79 ‘B’
From 60 to 69 ‘C’
From 50 to 59 ‘D’
0 - 49 'F'
Display the test percentage and letter grade for the student.
Count how many pass percentages (50 - 100) and fail (0 - 49) percentages, as well as invalid percentages (below zero and above 100), are entered.
then calculate the average percentage (from the valid percentages entered). Display the average percentage, number of passes, number of fails, and number of invalid percentages.
Code a program to get an unknown number of test percentages from the user. Accept percentages until the user enter a percentage of -99. This number ( -99) indicates the end of the data and must not be used as part of the calculations.
using javafx
A dentist requests you to develop the Dental Payment application. This application is used to calculate the total bill. The clinic provides the services and their price as shown in the table below.
Services Prices (RM)
1.Cleaning 35.00
2.Cavity Filling 150.00
3.X-ray 85.00
4.Flouride 50.00
5.Root canal 225.00
6.Other Type in
Your dental payment entry form is shown as follows:
-----------------------------------------
Dental Payment Application
-----------------------------------------
Dental Payment Entry Form
Patient Name
Services Prices(RM)
Cleaning 35.00
Cavity Filling 150.00
X-ray 85.00
Flouride 50.00
Root canal 225.00
Other
---------------------------------------
total
calculate
Write a file program to merge the content of source1.txt file and
source2.txt file to destination.txt file and display the fallowing from
the destination file.
• Count number of lines
• Count number of words
• Count the frequency of occurrence of the words
source1.txt
Hello Welcome to KSRCT
Hello Welcome to KSRCE
source2.txt
Hello Welcome to KSRIET
Hello Welcome to KSRCAS
Destination.txt
Hello Welcome to KSRCT
Hello Welcome to KSRCE
Hello Welcome to KSRIET
Hello Welcome to KSRCAS
Output display after reading from destination.txt file
Number of lines : 04
Number of words: 16
Frequency of words
Hello appears 4 times
Welcome appears 4 times
to appears 4 times
KSRCT, KSRCE, KSRIET and KSRCAS appears 1 times
Add two polynomials
Given two polynomials A and B, write a program that adds the given two polynomials
Output:-
Print the addition of polynomials A and B.
The format for printing polynomials is: Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0,
If co-efficient is zero then don't print the term.
If the term with highest degree is negative, the term should be represented as -Cix^Pi.
For the term where power is 1 represent it as C1x instead of C1x^1.
If the degree of polynomial is zero and the constant term is also zero, then just print 0 to represent the polynomial.
For term Cix^Pi, if the coefficient of the term Ci is 1, simply print x^Pi instead of 1x^Pi.
Explanation
If M = 4 and polynomial A
For power 0, co-efficient is 5
For power 1, co-efficient is 0
For power 2, co-efficient is 10
For power 3, co-efficient is 6.
If N = 3 and for polynomial B
For power 0, co-efficient is 1
For power 1, co-efficient is 2
For power 2, co-efficient is 4.
1: write a program to read numbers from a file.
2: Write a program to read string from a file.
Write a template function that returns the average of all the elements of an array. The arguments to the function should be the array name and the size of the array (type int). In main(), exercise the function with arrays of type int, long, double, and char.
Write a program to add the contents of one file at the end of another.