Answer:
public static boolean isReverse(int [ ]a, int [ ]b ){
for (int i=0;i<a.length;i++)
{
if(!(a[i] == b[a.length-i-1]))
return false;
}
return true;
}
Explanation:
Using a for loop, we go through the elements of the first array. The if comapres and checks if any of the values are not the same as the appropriate value on the other array, if it is so, then it is not a reverse, and we return false. else we return true.
Answer:
D. project management software
If $due_date contains a DateTime object, $due_date_diff will contain
c. a DateInterval object
Explanation:
- The DateInterval class ¶ represents a date interval.
- A date interval stores either a fixed amount of time (in years, months, days, hours etc) or a relative time string in the format that DateTime's constructor supports.
- The diff method is just as easy to use, but provides an extra piece of information: total days. This is important because when using the DateTime object to find a difference, we have a source and destination date, and therefore we can reduce the units of time into larger denominations. However, having the total number of days in between is a valuable piece of information.
- The PHP DateTime class has three methods that work with a DateInterval object:
- add
- sub
- diff
Properties
- y :Number of years.
-
m :Number of months.
-
d :Number of days.
-
h :Number of hours.
-
i :Number of minutes.
-
s :Number of seconds.
Answer:
The pseudocode is as given below while the flowchart is attached.
Explanation:
The pseudocode is as follows
input customer name, number of texts
Set Basic bill=5 $;
if the number of texts is less than or equal to 60
Extra Charge=0;
If the number of texts is greater than 60 and less than 200
number of texts b/w 60 and 200 =number of texts-60;
Extra Charge=0.1*(number of texts b/w 60 and 200);
else If the number of texts is greater than 200
number of texts beyond 200 =number of texts-200;
Extra Charge=0.25*(number of texts beyond 200)+0.1*(200-60);
Display Customer Name
Total Bill=Basic bill+Extra Charge;
Total Bill after Tax=Total Bill*1.12;