Answer and Explanation:
Using javascript:
function dayof_theweek(){
var TodayDate = window. prompt("enter today's date in the format 'year, month, day' ");
var Datenow=new date(TodayDate);
var Dayofweek=Datenow.getday();
var Days=["monday","Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
if(Dayofweek==indexOf(Days[Dayofweek]))
{
document.createTextnode(Days[Dayofweek]);
}
}
The program above uses a date object which uses the method getday to get the day of the week(get day returns an integer from 0 to 6).we then use a comparison operator == to test the condition that returned value Dayoftheweek is same with the index of the array Days and then print to a html document. The program may need improvements such as the fact that errors may arise when proper input isn't given, and therefore must be handled.
public static void main()
{
String s = Console.ReadLine();
int len = s.length();
Char startletter = s[0];
Char endletter = s[len-1];
string midletter = ‘’;
if(len % 2 ==0)
midletter = s[len/2] + s[(len/2) +1]
else
midletter = s[len/2];
Console.WriteLine(startletter + midletter + endletter);
}
Here the logic is that, startletter is obtained using the index ‘0’, the last letter is obtained by calculating the “length of the string” and subtract 1 to get the “last index” of the given string.
Middle letter is calculated by first finding whether the given string length is “odd or even” and based on that index(es) are identified.
The five moral dimensions are:
- Information rights and obligations.
- Property rights and obligations
- System quality.
- Quality of life,
- Accountability and control.
I see that Quality of life is most difficult for society to deal with as there ae lots of rich and poor people and the government have not been able to bridge the gap between them.
<h3>What are the morals about?</h3>
The five main moral dimensions that are known to be written above are said to be tied together in regards to ethical, social, and political issues that are seen in any information society.
Therefore, The five moral dimensions are:
- Information rights and obligations.
- Property rights and obligations
- System quality.
- Quality of life,
- Accountability and control.
Learn more about moral dimensions from
brainly.com/question/15130761
#SPJ1