Write a javascript program that asks the user to enter his or her first name and then last name, and then
constructs, stores, and displays a third string consisting of the user’s last name followed by a comma, a
space, and first name. Use string objects and methods from the string header file. A sample run could
look like this:
Enter your first name: Paul
Enter your last name: Smith
Here’s the information in a single string: Smith, Paul
Write a javascript program that asks the user to enter up to 10 golf scores, which are to be stored in an array. You should provide a means for the user to terminate input prior to entering 10 scores. The program should display all the scores on one line and report the average score. Handle input, display, and the average calculation with three separate array processing functions.
Sample run 1:
Java lab01_task04 N88W 8h30 9h45 6.25
Output:
Vehicle Details
N88W
++++++++++++++++++++++
Arrival 8h30
Departure 9h45
++++++++++++++++++++++
Total Cost: N$ 6.25
++++++++++++++++++++++
Day Name - 2
Given the weekday of the first day of the month, determine the day of the week of the given date in that month.
The first line is a string
The output should be a string.
In the given example,
D = Monday. As the 1st of the day of the month is a Monday, it means the 7th and 14th of the month will be Sundays (A week has 7 days). So the 16th day (N = 16) of the month will be a Tuesday.So, the output should be
Tuesday